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:
@@ -714,6 +714,8 @@ wxRendererGeneric::DrawCheckBox(wxWindow *WXUNUSED(win),
|
||||
|
||||
wxSize wxRendererGeneric::GetCheckBoxSize(wxWindow *win)
|
||||
{
|
||||
wxCHECK_MSG( win, wxSize(0, 0), "Must have a valid window" );
|
||||
|
||||
return win->FromDIP(wxSize(16, 16));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user