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:
@@ -93,8 +93,9 @@ void wxColourRefData::FreeColour()
|
|||||||
if (!m_colormap)
|
if (!m_colormap)
|
||||||
return;
|
return;
|
||||||
#if !wxUSE_NANOX
|
#if !wxUSE_NANOX
|
||||||
if ((wxTheApp->m_visualInfo->m_visualType == GrayScale) ||
|
if ( wxTheApp &&
|
||||||
(wxTheApp->m_visualInfo->m_visualType == PseudoColor))
|
(wxTheApp->m_visualInfo->m_visualType == GrayScale ||
|
||||||
|
wxTheApp->m_visualInfo->m_visualType == PseudoColor) )
|
||||||
{
|
{
|
||||||
int idx = m_color.pixel;
|
int idx = m_color.pixel;
|
||||||
colMapAllocCounter[ idx ] = colMapAllocCounter[ idx ] - 1;
|
colMapAllocCounter[ idx ] = colMapAllocCounter[ idx ] - 1;
|
||||||
|
Reference in New Issue
Block a user