]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/colour.cpp
Simplified and extended compiler detection for OS/2.
[wxWidgets.git] / src / x11 / colour.cpp
index f62111a9098b9a733b655c7733d487c554fd9b33..9ce03f2d5b94e88f5c6d649bcfb951a08597c61c 100644 (file)
@@ -93,8 +93,9 @@ void wxColourRefData::FreeColour()
     if (!m_colormap)
         return;
 #if !wxUSE_NANOX
     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;
     {
         int idx = m_color.pixel;
         colMapAllocCounter[ idx ] = colMapAllocCounter[ idx ] - 1;
@@ -213,7 +214,7 @@ bool wxColour::operator == ( const wxColour& col ) const
 
     return (own->red == other->red)
         && (own->green == other->green)
 
     return (own->red == other->red)
         && (own->green == other->green)
-        && (own->blue == other->blue)
+        && (own->blue == other->blue) ;
 
 }
 
 
 }