X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..4f3449b43280a855e57280e6848610ea9fdaa3bb:/src/common/strconv.cpp

diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp
index 40c4ae3c50..92699a8c3a 100644
--- a/src/common/strconv.cpp
+++ b/src/common/strconv.cpp
@@ -402,7 +402,7 @@ WXDLLEXPORT_DATA(wxCSConv) wxConvLocal((const wxChar *)NULL);
 // - perhaps common encodings to objects ("UTF8" -> wxConvUTF8)
 // - move wxEncodingConverter meat in here
 
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
 #include "wx/msw/registry.h"
 // this should work if M$ Internet Exploiter is installed
 static long CharsetToCodepage(const wxChar *name)
@@ -616,7 +616,7 @@ public:
 };
 #endif
 
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
 class CP_CharSet : public wxCharacterSet
 {
 public:
@@ -722,7 +722,7 @@ static wxCharacterSet *wxGetCharacterSet(const wxChar *name)
         cset = NULL;
     }
 
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
     cset = new CP_CharSet(name); // may take NULL
     if (cset->usable())
         return cset;
@@ -776,7 +776,8 @@ void wxCSConv::LoadNow()
                 SetName(name);
         }
 
-        m_cset = wxGetCharacterSet(m_name);
+        // wxGetCharacterSet() complains about NULL name
+        m_cset = m_name ? wxGetCharacterSet(m_name) : NULL;
         m_deferred = FALSE;
     }
 }