Check for non-null window in wxRendererNative::GetCheckBoxSize()
Instead of running normally under some platforms and crashing under MSW (when using themes) when passing NULL to GetCheckBoxSize(), now consistently assert and return zero size everywhere. Closes #18241.
This commit is contained in:
@@ -551,8 +551,13 @@ wxRendererGTK::DrawComboBoxDropButton(wxWindow *win,
|
||||
}
|
||||
|
||||
wxSize
|
||||
wxRendererGTK::GetCheckBoxSize(wxWindow *WXUNUSED(win))
|
||||
wxRendererGTK::GetCheckBoxSize(wxWindow* win)
|
||||
{
|
||||
// Even though we don't use the window in this implementation, still check
|
||||
// that it's valid to avoid surprises when running the same code under the
|
||||
// other platforms.
|
||||
wxCHECK_MSG( win, wxSize(0, 0), "Must have a valid window" );
|
||||
|
||||
#ifdef __WXGTK3__
|
||||
int min_width, min_height;
|
||||
wxGtkStyleContext sc;
|
||||
|
Reference in New Issue
Block a user