From ac7f6cf0a9cff648a98e3cecea1f99626a5cd74a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 25 Jul 2004 23:42:45 +0000 Subject: [PATCH] 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 --- src/x11/colour.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;