[glade/glade-3-8] * plugins/gtk+/glade-column-types.c: Fixed crash when user performs Drag'n'Drop of < enter column



commit 159c553aa01ca5721df7427bd6c61a3c887d82dc
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Jan 23 13:50:18 2011 +0900

    	* plugins/gtk+/glade-column-types.c: Fixed crash when user performs Drag'n'Drop of
    	< enter column here > and no columns are yet added (fixes bug 633943).
    
    Conflicts:
    
    	plugins/gtk+/glade-column-types.c

 ChangeLog                         |    3 +++
 plugins/gtk+/glade-column-types.c |    8 +++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d9a6dfc..5400d66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,9 @@
 
 	* plugins/gtk+/glade-gtk.c: Fixed GtkMenuToolButton to save the "menu" child properly
 
+	* plugins/gtk+/glade-column-types.c: Fixed crash when user performs Drag'n'Drop of
+	< enter column here > and no columns are yet added (fixes bug 633943).
+
 2011-01-08  Tristan Van Berkom <tristanvb openismus com>
 
 	* plugins/Makefile.am, plugins/glade-tool-item-group-editor.[ch], plugins/gtk+.xml.in,
diff --git a/plugins/gtk+/glade-column-types.c b/plugins/gtk+/glade-column-types.c
index 91fffe1..61c318d 100644
--- a/plugins/gtk+/glade-column-types.c
+++ b/plugins/gtk+/glade-column-types.c
@@ -420,7 +420,13 @@ columns_changed_idle (GladeEditorProperty *eprop)
 	gchar                 *column_name;
 
 	glade_property_get (eprop->property, &columns);
-	g_assert (columns);
+
+
+	/* This can happen when the user performs DnD and there
+	 * are no columns yet */
+	if (!columns)
+		return FALSE;
+
 	columns = glade_column_list_copy (columns);
 
 	if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (eprop_types->store), &iter))



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