summaryrefslogtreecommitdiff
path: root/graphics/dia/patches/0015-Fix-assumption-that-table-prop_dialog-is-always-vali.patch
blob: 73694c7d7d938b769a875f7d876be10e108df78c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 8fd585ca493d7d52f2af866cd9ce6e064da6bf15 Mon Sep 17 00:00:00 2001
From: Hans Breuer <hans@breuer.org>
Date: Fri, 16 Aug 2013 13:33:42 +0200
Subject: [PATCH 15/24] 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 file changed, 2 insertions(+), 1 deletion(-)

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
-- 
1.8.4.4