aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-11-21 13:00:14 +0000
committernyamatongwe <unknown>2002-11-21 13:00:14 +0000
commitc2cb313437420fa9abec5100f924343e9f110ac7 (patch)
tree39edf718b09f7c442309314c1da200a6a6acbdb1
parent80a672aa76c64c58f5a7571879b83e1e44cd2db6 (diff)
downloadscintilla-mirror-c2cb313437420fa9abec5100f924343e9f110ac7.tar.gz
Protect against foreach over null pointer.
-rw-r--r--gtk/PlatGTK.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 2554f3dd4..8c19e5f85 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -1159,8 +1159,10 @@ static void list_image_free(gpointer, gpointer value, gpointer) {
}
ListBox::~ListBox() {
- g_hash_table_foreach((GHashTable *) pixhash, list_image_free, NULL);
- g_hash_table_destroy((GHashTable *) pixhash);
+ if (pixhash) {
+ g_hash_table_foreach((GHashTable *) pixhash, list_image_free, NULL);
+ g_hash_table_destroy((GHashTable *) pixhash);
+ }
}
static void SelectionAC(GtkWidget *, gint row, gint,