[gthumb] Fixed crash when dropping an image to an empty Library



commit 91feff167c1fad6d38cbcf740d614bd055bdde1b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Jul 4 14:35:02 2010 +0200

    Fixed crash when dropping an image to an empty Library
    
    [bug #619491]

 extensions/file_manager/callbacks.c |    3 +++
 gthumb/gth-browser.c                |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/extensions/file_manager/callbacks.c b/extensions/file_manager/callbacks.c
index a895f5d..919ecaa 100644
--- a/extensions/file_manager/callbacks.c
+++ b/extensions/file_manager/callbacks.c
@@ -682,6 +682,9 @@ fm__gth_browser_folder_tree_drag_data_received_cb (GthBrowser    *browser,
 	GthFileSource *file_source;
 	GthTask       *task;
 
+	if (destination == NULL)
+		return;
+
 	file_source = gth_main_get_file_source (destination->file);
 	if (file_source == NULL)
 		return;
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 1d9447b..05f03a0 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -2378,7 +2378,7 @@ folder_tree_drag_data_received (GtkWidget        *tree_view,
 
 	_g_object_list_unref (file_list);
 	g_strfreev (uris);
-	g_object_unref (destination);
+	_g_object_unref (destination);
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]