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
This commit is contained in:
Stefan Csomor
2007-11-10 20:36:22 +00:00
parent cba7320c9c
commit c41acdab51

View File

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