X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fc8b9a4fe462ee36b4a120303588a04d1b8e7a1..fdf20a26dba64a6d31dead1e1d19b2d755c0af13:/src/gtk/radiobox.cpp

diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp
index 18f02bf683..a0e73a219d 100644
--- a/src/gtk/radiobox.cpp
+++ b/src/gtk/radiobox.cpp
@@ -608,7 +608,9 @@ GdkWindow *wxRadioBox::GTKGetWindow(wxArrayGdkWindows& windows) const
     {
         GtkWidget *button = GTK_WIDGET( node->GetData()->button );
 
-        windows.push_back(button->window);
+        // don't put NULL pointers in the 'windows' array!
+        if (button->window)
+            windows.push_back(button->window);
 
         node = node->GetNext();
     }