fixed return code checking in wxImageList::Replace() (bug 1380664)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -210,7 +210,7 @@ bool wxImageList::Replace(int index,
|
|||||||
// Replaces a bitmap and mask from an icon.
|
// Replaces a bitmap and mask from an icon.
|
||||||
bool wxImageList::Replace(int i, const wxIcon& icon)
|
bool wxImageList::Replace(int i, const wxIcon& icon)
|
||||||
{
|
{
|
||||||
bool ok = ImageList_ReplaceIcon(GetHImageList(), i, GetHiconOf(icon)) != 0;
|
bool ok = ImageList_ReplaceIcon(GetHImageList(), i, GetHiconOf(icon)) != -1;
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
wxLogLastError(wxT("ImageList_ReplaceIcon()"));
|
wxLogLastError(wxT("ImageList_ReplaceIcon()"));
|
||||||
|
Reference in New Issue
Block a user