]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/chm.cpp
Add missing WXK constants for the control keys
[wxWidgets.git] / src / html / chm.cpp
index 195e7b9a95fe9c71a3dcf064f29fe58f27a08d2a..954bd46490e42a0b608d10c9b5f82f346020dbb9 100644 (file)
@@ -563,7 +563,6 @@ void
 wxChmInputStream::CreateHHPStream()
 {
     wxFileName file;
-    bool topic = false;
     bool hhc = false;
     bool hhk = false;
     wxInputStream *i;
@@ -631,7 +630,6 @@ wxChmInputStream::CreateHHPStream()
                     break;
                 case 2: // DEFAULT_TOPIC
                     tmp = "Default Topic=";
-                    topic = true;
                     break;
                 case 3: // TITLE
                     tmp = "Title=";
@@ -842,6 +840,8 @@ wxFSFile* wxChmFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs),
     }
 
     wxFileName leftFilename = wxFileSystem::URLToFileName(left);
+    if (!leftFilename.FileExists())
+        return NULL;
 
     // Open a stream to read the content of the chm-file
     s = new wxChmInputStream(leftFilename.GetFullPath(), right, true);