]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strconv.cpp
wxDC::SetClippingRegion() in wxMSW works like in wxGTK, i.e. combines the given regio...
[wxWidgets.git] / src / common / strconv.cpp
index 0631cb5b68a3c52df24eb4ebea0e2d963f610ae9..d53b870f40b4939e05f0c2d25b0d456778f876a3 100644 (file)
@@ -933,11 +933,17 @@ static wxCharacterSet *wxGetCharacterSet(const wxChar *name)
 #endif // HAVE_ICONV/!HAVE_ICONV
     }
 
-    if ( cset->usable() )
-        return cset;
+    // it can only be NULL in this case
+#ifndef HAVE_ICONV
+    if ( cset )
+#endif // !HAVE_ICONV
+    {
+        if ( cset->usable() )
+            return cset;
 
-    delete cset;
-    cset = NULL;
+        delete cset;
+        cset = NULL;
+    }
 
 #if defined(__WIN32__) && !defined(__WXMICROWIN__)
     cset = new CP_CharSet(name);