aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2002-11-21 13:00:14 +0000
committernyamatongwe <devnull@localhost>2002-11-21 13:00:14 +0000
commitfd28ea00badd7c830037d629f2e6f0965247b7e3 (patch)
tree39edf718b09f7c442309314c1da200a6a6acbdb1
parent7bc08cce00adf4ddc6cd225e4219b625ed7147a0 (diff)
downloadscintilla-mirror-fd28ea00badd7c830037d629f2e6f0965247b7e3.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,