X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68be9f090f422450d333385cf62c9b4d350674be..dbaf885e8725529ba66653aabe5f7f20bc1f28db:/src/html/htmprint.cpp diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index e552d63d80..ed299f645d 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -266,6 +266,13 @@ void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile) { wxFileSystem fs; wxFSFile *ff = fs.OpenFile(htmlfile); + + if (ff == NULL) + { + wxLogError(htmlfile + _(": file does not exist!")); + return; + } + wxInputStream *st = ff -> GetStream(); char *t = new char[st -> GetSize() + 1]; st -> Read(t, st -> GetSize());