Fix crash when clearing read-only wxOwnerDrawnComboBox
Check that we have an associated text entry before clearing it.
Fixes a crash introduced by 72fe57ec18
without reverting it as it still seems reasonable to use Clear() here.
Closes #18013.
This commit is contained in:
committed by
Vadim Zeitlin
parent
4a37f2dd15
commit
f0d5e95412
@@ -991,7 +991,9 @@ void wxOwnerDrawnComboBox::DoClear()
|
|||||||
|
|
||||||
GetVListBoxComboPopup()->Clear();
|
GetVListBoxComboPopup()->Clear();
|
||||||
|
|
||||||
wxTextEntry::Clear();
|
// There is no text entry when using wxCB_READONLY style, so test for it.
|
||||||
|
if ( GetTextCtrl() )
|
||||||
|
wxTextEntry::Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxOwnerDrawnComboBox::Clear()
|
void wxOwnerDrawnComboBox::Clear()
|
||||||
|
Reference in New Issue
Block a user