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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user