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:
Vadim Zeitlin
2005-12-14 18:56:15 +00:00
parent d8746da256
commit 9fe0c2fcf7

View File

@@ -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()"));