X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9aedce13556c94395e3a7540e1bee02cd568ebf..a0d8a3052817fef6eef27e9a6ab8802495a39db8:/src/common/resource.cpp diff --git a/src/common/resource.cpp b/src/common/resource.cpp index fc9b8f507a..ac44cbc882 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -824,9 +824,13 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr) if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) { wxString str(expr->Nth(count)->StringValue()); - controlItem->SetValue4(str); count ++; - controlItem->SetType("wxBitmapButton"); + + if (str != "") + { + controlItem->SetValue4(str); + controlItem->SetType("wxBitmapButton"); + } } if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); @@ -2173,7 +2177,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table "Forgot to use wxResourceLoadBitmapData?"), (const char*) name); return wxNullBitmap; } - return wxBitmap((const char **)item->GetValue1()); + return wxBitmap((char **)item->GetValue1()); #else wxLogWarning(_("No XPM facility available!")); #endif