]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xml.cpp
yet another variation on the same theme: wxMAKE_ART_ID_FROM_STR
[wxWidgets.git] / src / xrc / xml.cpp
index 32ee02a04b11f08f660468273f63caef805c8310..a1c6a01796dcc8c1f13f3fcb0f758d24c6df6dea 100644 (file)
@@ -353,8 +353,9 @@ inline static wxString CharToString(wxMBConv *conv,
         wchar_t *buf = new wchar_t[nLen+1];
         wxConvUTF8.MB2WC(buf, s, nLen);
         buf[nLen] = 0;
+        wxString s(buf, *conv, len);
         delete[] buf;
-        return wxString(buf, *conv, len);
+        return s;
     }
     else
         return wxString(s, len);