From: Stefan Csomor Date: Sat, 10 Nov 2007 20:36:22 +0000 (+0000) Subject: avoiding a -1,-1 being set as icon size X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c41acdab517ea043497c4ef7d3f06827f5965165?ds=inline avoiding a -1,-1 being set as icon size git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/icon.cpp b/src/mac/carbon/icon.cpp index ee61c69a8d..3457355e0c 100644 --- a/src/mac/carbon/icon.cpp +++ b/src/mac/carbon/icon.cpp @@ -61,8 +61,11 @@ wxIcon::wxIcon(WXHICON icon, const wxSize& size) AcquireIconRef( (IconRef) icon ) ; m_refData = new wxIconRefData( icon ) ; - M_ICONDATA->SetWidth( size.x ) ; - M_ICONDATA->SetHeight( size.y ) ; + if ( (size.x != -1) && (size.y != -1) ) + { + M_ICONDATA->SetWidth( size.x ) ; + M_ICONDATA->SetHeight( size.y ) ; + } } wxIcon::~wxIcon()