]> git.saurik.com Git - wxWidgets.git/commitdiff
avoid assert in window list drop down
authorBenjamin Williams <bwilliams@kirix.com>
Thu, 5 Apr 2007 16:31:23 +0000 (16:31 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Thu, 5 Apr 2007 16:31:23 +0000 (16:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp

index a30edc27f8b6b7ce87e3520f848c2e0dbb63e4ba..8dc1918a7f08bb4609affca66fed03b4399bc5b9 100644 (file)
@@ -666,7 +666,14 @@ int wxAuiDefaultTabArt::ShowDropDown(wxWindow* wnd,
     for (i = 0; i < count; ++i)
     {
         const wxAuiNotebookPage& page = pages.Item(i);
-        menuPopup.AppendCheckItem(1000+i, page.caption);
+        wxString caption = page.caption;
+
+        // if there is no caption, make it a space.  This will prevent
+        // an assert in the menu code.
+        if (caption.IsEmpty())
+            caption = wxT(" ");
+
+        menuPopup.AppendCheckItem(1000+i, caption);
     }
 
     if (active_idx != -1)