- if ( !GetMinSize().IsFullySpecified() )
- wxConstCast(this, wxWindowBase)->SetMinSize(GetSize());
+ wxSize size = GetMinSize();
+ if ( !size.IsFullySpecified() )
+ {
+ size.SetDefaults(GetSize());
+ wxConstCast(this, wxWindowBase)->SetMinSize(size);
+ }