From 0ab244423358250b4eefded4ccfb7c28de001f96 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Tue, 26 Aug 2008 05:10:45 +0000 Subject: [PATCH] fix for GTK assertion `info->icon_pixmap == NULL' failed, #9905 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/toplevel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 36c2cac0c9..09d89fba5b 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -1245,6 +1245,12 @@ void wxTopLevelWindowGTK::SetIcons( const wxIconBundle &icons ) wxTopLevelWindowBase::SetIcons( icons ); + // Setting icons before window is realized can cause a GTK assertion if + // another TLW is realized before this one, and it has this one as it's + // transient parent. The life demo exibits this problem. + if (!GTK_WIDGET_REALIZED(m_widget)) + return; + GList *list = NULL; size_t max = icons.m_icons.GetCount();