gtk+2.0 (2.20.1-2) 035_filechooser_crash.patch

Summary

 gtk/gtkfilesystemmodel.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

From 7868c0b58855b61717454bb85f62caf720b8f623 Mon Sep 17 00:00:00 2001
From: Sergey Orlov <wasp82@bk.ru>
Date: Tue, 24 Aug 2010 18:17:15 +0000
Subject: bgo#614006 - GtkFileSystemModel - Make sure to generate node IDs are valid for new files

When a file was inserted during the period that the editable row was
active, the node IDs would not get updated correctly.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
---
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 7c9e1dc..933420c 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -1778,7 +1778,10 @@ _gtk_file_system_model_update_file (GtkFileSystemModel *model,
 
   id = node_get_for_file (model, file);
   if (id == 0)
-    add_file (model, file, info);
+    {
+      add_file (model, file, info);
+      id = node_get_for_file (model, file);
+    }
 
   node = get_node (model, id);
 
--
cgit v0.8.3.1