hhctrl.ocx: Fix a NULL dereference mistake in the Contents tab.
authorErich Hoover <ehoover@mines.edu>
Fri, 29 Jan 2010 15:00:30 +0000 (08:00 -0700)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 29 Jan 2010 16:26:46 +0000 (17:26 +0100)
dlls/hhctrl.ocx/help.c

index e7b7a64272b2804dbeddc4b70b813ceaf173f9a9..e8121e79102adffb5cd13d1d22b6f9d4814d20c8 100644 (file)
@@ -419,7 +419,6 @@ static LRESULT OnTopicChange(HHInfo *info, void *user_data)
             }
             citer = citer->parent;
         }
-        chmfile = citer->merge.chm_file;
         break;
     case TAB_INDEX:
         iiter = (IndexItem *) user_data;
@@ -458,6 +457,12 @@ static LRESULT OnTopicChange(HHInfo *info, void *user_data)
         return 0;
     }
 
+    if(!chmfile)
+    {
+        FIXME("No help file found for this item!\n");
+        return 0;
+    }
+
     TRACE("name %s loal %s\n", debugstr_w(name), debugstr_w(local));
 
     NavigateToChm(info, chmfile, local);