]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed crash on invalid data (patch 1039453)
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 3 Oct 2004 16:31:58 +0000 (16:31 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 3 Oct 2004 16:31:58 +0000 (16:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/helpdata.cpp

index 5f9d39ea19a55a286e4613b1d763938d36d385eb..327cc5fa4e9d6ef3627f87a4cd91a75231eea133 100644 (file)
@@ -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);