git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65783 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
     }
 
     wxFileName leftFilename = wxFileSystem::URLToFileName(left);
     }
 
     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);
 
     // Open a stream to read the content of the chm-file
     s = new wxChmInputStream(leftFilename.GetFullPath(), right, true);