X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/887dd52f06a985ec0455e91f4b3d2b091a1b1c7b..a679468530239a32cf7efa0d566d5c03a9c90c3f:/src/gtk1/colour.cpp diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index d4b9194145..84c790a329 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -35,6 +35,14 @@ public: m_hasPixel = FALSE; } + wxColourRefData(const wxColourRefData& data) + : wxObjectRefData() + { + m_color = data.m_color; + m_colormap = data.m_colormap; + m_hasPixel = data.m_hasPixel; + } + ~wxColourRefData() { FreeColour(); @@ -110,8 +118,8 @@ void wxColourRefData::AllocColour( GdkColormap *cmap ) FreeColour(); #ifdef __WXGTK20__ - if ((m_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || - (m_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) + if ( (cmap->visual->type == GDK_VISUAL_GRAYSCALE) || + (cmap->visual->type == GDK_VISUAL_PSEUDO_COLOR) ) #else GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap; if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||