From b19d5e569e72a4c91708bba85c0b2268b28fe935 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 24 Jan 2000 15:38:42 +0000 Subject: [PATCH] fixed false error report with helpfiles without index git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/helpdata.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 0c34284d53..befee0b860 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -222,7 +222,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, c HP_TagHandler *handler = new HP_TagHandler(book); parser.AddTagHandler(handler); - f = ( contentsfile.IsEmpty() ? 0 : fsys.OpenFile(contentsfile) ); + f = ( contentsfile.IsEmpty() ? NULL : fsys.OpenFile(contentsfile) ); if (f) { sz = f -> GetStream() -> GetSize(); buf = new char[sz + 1]; @@ -237,7 +237,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, c else wxLogError(_("Cannot open contents file: %s"), contentsfile.mb_str()); - f = ( indexfile.IsEmpty() ? 0 : fsys.OpenFile(indexfile) ); + f = ( indexfile.IsEmpty() ? NULL : fsys.OpenFile(indexfile) ); if (f) { sz = f -> GetStream() -> GetSize(); buf = new char[sz + 1]; @@ -249,7 +249,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, c handler -> WriteOut(m_Index, m_IndexCnt); delete[] buf; } - else + else if (!indexfile.IsEmpty()) wxLogError(_("Cannot open index file: %s"), indexfile.mb_str()); return TRUE; } -- 2.45.2