From: Václav Slavík Date: Sun, 3 Oct 2004 16:31:58 +0000 (+0000) Subject: fixed crash on invalid data (patch 1039453) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7fbe5489ad278f89ba20788310fe0db9f0647898 fixed crash on invalid data (patch 1039453) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 5f9d39ea19..327cc5fa4e 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -78,6 +78,11 @@ wxHtmlHelpIndexCompareFunc(wxHtmlHelpDataItem **a, wxHtmlHelpDataItem **b) wxHtmlHelpDataItem *ia = *a; wxHtmlHelpDataItem *ib = *b; + if (ia == NULL) + return -1; + if (ib == NULL) + return 1; + if (ia->parent == ib->parent) { return ia->name.CmpNoCase(ib->name);