From: Vadim Zeitlin Date: Sun, 25 Jul 2004 23:42:45 +0000 (+0000) Subject: check if wxTheApp still exists in FreeColour(); fixes crash on shutdown X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ac7f6cf0a9cff648a98e3cecea1f99626a5cd74a check if wxTheApp still exists in FreeColour(); fixes crash on shutdown git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/x11/colour.cpp b/src/x11/colour.cpp index b334a9b931..9ce03f2d5b 100644 --- a/src/x11/colour.cpp +++ b/src/x11/colour.cpp @@ -93,8 +93,9 @@ void wxColourRefData::FreeColour() if (!m_colormap) return; #if !wxUSE_NANOX - if ((wxTheApp->m_visualInfo->m_visualType == GrayScale) || - (wxTheApp->m_visualInfo->m_visualType == PseudoColor)) + if ( wxTheApp && + (wxTheApp->m_visualInfo->m_visualType == GrayScale || + wxTheApp->m_visualInfo->m_visualType == PseudoColor) ) { int idx = m_color.pixel; colMapAllocCounter[ idx ] = colMapAllocCounter[ idx ] - 1;