always remember to test IsOk() after using wxFileInputStream

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-01-08 18:26:35 +00:00
parent 35510e483f
commit 9690b00654
7 changed files with 38 additions and 12 deletions

View File

@@ -717,6 +717,9 @@ bool wxChmInputStream::CreateFileStream(const wxString& pattern)
{
// Open a filestream to extracted file
fin = new wxFileInputStream(tmpfile);
if (!fin->IsOk())
return false;
m_size = fin->GetSize();
m_content = (char *) malloc(m_size+1);
fin->Read(m_content, m_size);