[gthumb] Fixed crash when renaming and quickly hitting the Enter key



commit c8acb91cf6fa2389bdc47e9d1f456e728ac11c07
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun May 23 11:04:59 2010 +0200

    Fixed crash when renaming and quickly hitting the Enter key
    
    [bug #619352]

 gthumb/gth-browser.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index c66f468..88d1d38 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -4858,13 +4858,16 @@ file_metadata_ready_cb (GList    *files,
 			gpointer  user_data)
 {
 	LoadFileData *data = user_data;
-	GthBrowser   *browser;
+	GthBrowser   *browser = data->browser;
 	GthFileData  *file_data;
 	GList        *scan;
 
-	browser = data->browser;
-	file_data = files->data;
+	if ((error != NULL) || (files == NULL)) {
+		load_file_data_unref (data);
+		return;
+	}
 
+	file_data = files->data;
 	if ((browser->priv->current_file == NULL) || ! g_file_equal (file_data->file, browser->priv->current_file->file)) {
 		load_file_data_unref (data);
 		return;



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