[gthumb] do not clear the location_source before the location is loaded
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] do not clear the location_source before the location is loaded
- Date: Mon, 23 Apr 2012 18:03:35 +0000 (UTC)
commit 2565eae4749e61bda7d6d25b582f537e0d4a2695
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Apr 23 19:46:29 2012 +0200
do not clear the location_source before the location is loaded
this makes the code more robust if a selection-changed signal is wrongly
emitted by the folder tree.
gthumb/gth-browser.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index c86faf5..090e6c7 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -1866,12 +1866,10 @@ _gth_browser_load (GthBrowser *browser,
case GTH_ACTION_GO_FORWARD:
case GTH_ACTION_GO_UP:
case GTH_ACTION_VIEW:
- if (browser->priv->location_source != NULL) {
- 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);
+ if ((browser->priv->location_source != NULL) && (browser->priv->monitor_location != NULL)) {
+ gth_file_source_monitor_directory (browser->priv->location_source,
+ browser->priv->monitor_location,
+ FALSE);
_g_clear_object (&browser->priv->monitor_location);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]