[dia/dia-0-97] Fix assumption that table->prop_dialog is always valid



commit 8fd585ca493d7d52f2af866cd9ce6e064da6bf15
Author: Hans Breuer <hans breuer org>
Date:   Fri Aug 16 13:33:42 2013 +0200

    Fix assumption that table->prop_dialog is always valid
    
    Not sure how I made it crash, but this extra safety measure
    should not hurt in any case.

 objects/Database/table_dialog.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/objects/Database/table_dialog.c b/objects/Database/table_dialog.c
index 038f8de..a17cead 100644
--- a/objects/Database/table_dialog.c
+++ b/objects/Database/table_dialog.c
@@ -269,7 +269,8 @@ table_state_set (TableState * state, Table * table)
   table_compute_width_height (table);
   table_update_positions (table);
 
-  gtk_list_clear_items (table->prop_dialog->attributes_list, 0, -1);
+  if (table->prop_dialog)
+    gtk_list_clear_items (table->prop_dialog->attributes_list, 0, -1);
 }
 
 static void


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