[gthumb] do not call gth_file_source_monitor_directory if the location is NULL
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] do not call gth_file_source_monitor_directory if the location is NULL
- Date: Mon, 23 Apr 2012 18:03:24 +0000 (UTC)
commit 1ddb2daf17503ba93258e75e872aa996523e7be7
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Apr 23 19:05:51 2012 +0200
do not call gth_file_source_monitor_directory if the location is NULL
gthumb/gth-browser.c | 7 ++++---
gthumb/gth-file-source.c | 2 ++
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index e382be1..b92c32f 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -1867,9 +1867,10 @@ _gth_browser_load (GthBrowser *browser,
case GTH_ACTION_GO_UP:
case GTH_ACTION_VIEW:
if (browser->priv->location_source != NULL) {
- gth_file_source_monitor_directory (browser->priv->location_source,
- browser->priv->monitor_location,
- FALSE);
+ if (browser->priv->monitor_location != NULL)
+ gth_file_source_monitor_directory (browser->priv->location_source,
+ browser->priv->monitor_location,
+ FALSE);
_g_clear_object (&browser->priv->location_source);
_g_clear_object (&browser->priv->monitor_location);
}
diff --git a/gthumb/gth-file-source.c b/gthumb/gth-file-source.c
index 49899a5..dea8567 100644
--- a/gthumb/gth-file-source.c
+++ b/gthumb/gth-file-source.c
@@ -1300,6 +1300,8 @@ gth_file_source_monitor_directory (GthFileSource *file_source,
GFile *file,
gboolean activate)
{
+ g_return_if_fail (file != NULL);
+
GTH_FILE_SOURCE_GET_CLASS (G_OBJECT (file_source))->monitor_directory (file_source, file, activate);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]