]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/colour.cpp
wxXmlNode::GetAttribute's pointer argument must not be NULL, check for it
[wxWidgets.git] / src / x11 / colour.cpp
index 2890656e0ef901b333f42c686acc53d54d813351..26dfeded955864d434a1c0af8d95db4d3b44b02a 100644 (file)
@@ -245,12 +245,12 @@ WXColor *wxColour::GetColor() const
     return (WXColor*) &M_COLDATA->m_color;
 }
 
-bool wxColour::FromString(const wxChar *name)
+bool wxColour::FromString(const wxString& name)
 {
     Display *dpy = wxGlobalDisplay();
     WXColormap colormap = wxTheApp->GetMainColormap( dpy );
     XColor xcol;
-    if ( XParseColor( dpy, (Colormap)colormap, wxConvertWX2MB(name), &xcol ) )
+    if ( XParseColor( dpy, (Colormap)colormap, name.mbc_str(), &xcol ) )
     {
         UnRef();