test whether pointer is non-NULL before using it, not after, in wxDoFindStringInList (this was probably harmless though)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
29014baaa5
commit
26564cf29d
@ -272,11 +272,10 @@ int wxDoFindStringInList(Widget w, const wxString& s)
|
||||
bool success = XmListGetMatchPos (w, str(),
|
||||
&positions, &no_positions);
|
||||
|
||||
if (success)
|
||||
if (success && positions)
|
||||
{
|
||||
int pos = positions[0];
|
||||
if (positions)
|
||||
XtFree ((char *) positions);
|
||||
XtFree ((char *) positions);
|
||||
return pos - 1;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user