summaryrefslogtreecommitdiff
path: root/logview/logview-manager.c
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-21 19:10:02 +0300
committerinfirit <[email protected]>2015-08-31 21:57:23 +0200
commit55463d8851281552f5cc549617a5d6d2927b7c8f (patch)
tree321e64721e4d83f3b104159f876e61887009743d /logview/logview-manager.c
parent8c08661057c66d312bb0b217cbd70f00e25c98c6 (diff)
downloadmate-utils-55463d8851281552f5cc549617a5d6d2927b7c8f.tar.bz2
mate-utils-55463d8851281552f5cc549617a5d6d2927b7c8f.tar.xz
logview: add some safety NULL-checks
from https://git.gnome.org/browse/gnome-system-log/commit/?id=ad9153b8bcd8a2556d7a1f5fcca890680c4677de
Diffstat (limited to 'logview/logview-manager.c')
-rw-r--r--logview/logview-manager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/logview/logview-manager.c b/logview/logview-manager.c
index 6d6bfb05..2448468e 100644
--- a/logview/logview-manager.c
+++ b/logview/logview-manager.c
@@ -393,6 +393,10 @@ logview_manager_close_active_log (LogviewManager *manager)
g_assert (LOGVIEW_IS_MANAGER (manager));
active_log = manager->priv->active_log;
+ if (active_log == NULL) {
+ return;
+ }
+
log_uri = logview_log_get_uri (active_log);
file = logview_log_get_gfile (active_log);