blind fix for wxMotif compilation with wxHAVE_LIB_XPM == 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1357,12 +1357,9 @@ bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name,
|
||||
if (stream.Ok())
|
||||
{
|
||||
wxImage image(decoder.ReadFile(stream));
|
||||
if (image.Ok())
|
||||
return CreateFromImage(image);
|
||||
else
|
||||
return FALSE;
|
||||
return image.Ok() && bitmap->CreateFromImage(image);
|
||||
}
|
||||
else
|
||||
#else // !wxHAVE_LIB_XPM && !wxUSE_STREAMS
|
||||
return FALSE;
|
||||
#endif // wxHAVE_LIB_XPM / wxUSE_STREAMS
|
||||
}
|
||||
@@ -1471,14 +1468,11 @@ bool wxXPMDataHandler::Create(wxBitmap *bitmap, void *bits,
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#else
|
||||
#else // !wxHAVE_LIB_XPM
|
||||
wxXPMDecoder decoder;
|
||||
wxImage image(decoder.ReadData(bits));
|
||||
if (image.Ok())
|
||||
return bitmap->CreateFromImage(image);
|
||||
else
|
||||
return FALSE;
|
||||
#endif
|
||||
wxImage image(decoder.ReadData((const char **)bits));
|
||||
return image.Ok() && bitmap->CreateFromImage(image);
|
||||
#endif // wxHAVE_LIB_XPM/!wxHAVE_LIB_XPM
|
||||
}
|
||||
|
||||
#endif // wxUSE_XPM
|
||||
|
Reference in New Issue
Block a user