From c41acdab517ea043497c4ef7d3f06827f5965165 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 10 Nov 2007 20:36:22 +0000 Subject: [PATCH] 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 --- src/mac/carbon/icon.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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() -- 2.50.0