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
This commit is contained in:
parent
3cd2f0bdee
commit
ac7f6cf0a9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user