X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0da1f1c4cc2fd8e8b6774b8e20b941bee759075f..f050bdbd5b69ed1a6752102f0c4c13bc7cb4ed3c:/src/propgrid/propgridpagestate.cpp diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 7c7aa7c9e0..7eb91e6ac1 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -322,7 +322,11 @@ void wxPropertyGridPageState::CalculateFontAndBitmapStuff( int WXUNUSED(vspacing void wxPropertyGridPageState::SetVirtualWidth( int width ) { - wxASSERT( width >= 0 ); + // Sometimes width less than 0 is offered. Let's make things easy for + // everybody and deal with it here. + if ( width < 0 ) + width = 0; + wxPropertyGrid* pg = GetGrid(); int gw = pg->GetClientSize().x; if ( width < gw )