]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/colour.cpp
Declare namespace std {} before using namespace std; for MetroWerks
[wxWidgets.git] / src / x11 / colour.cpp
index f1dc41edf334d7976d8f93fbcd6b2da674802f20..9ce03f2d5b94e88f5c6d649bcfb951a08597c61c 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     17/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart, Robert Roebling
-// Licence:    wxWidgets licence
+// Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
@@ -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;