aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/wtf
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-06-19 14:18:29 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-08-10 01:21:52 +0000
commit18557c26761581e10182d8c019ba3f5a6f81bb1c (patch)
treea7dc283da4c7abc8afdd0425fe8184ebdf276382 /src/3rdparty/masm/wtf
parent416c0f32632ef1393350e45a29311d7881828993 (diff)
Fix a crash when m_file is 0
Change-Id: If26e00877521c78a9d48b9798fe64e1d587bc10a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/3rdparty/masm/wtf')
-rw-r--r--src/3rdparty/masm/wtf/FilePrintStream.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/3rdparty/masm/wtf/FilePrintStream.cpp b/src/3rdparty/masm/wtf/FilePrintStream.cpp
index b5ab25e0bf..45f1565f46 100644
--- a/src/3rdparty/masm/wtf/FilePrintStream.cpp
+++ b/src/3rdparty/masm/wtf/FilePrintStream.cpp
@@ -38,7 +38,8 @@ FilePrintStream::~FilePrintStream()
{
if (m_adoptionMode == Borrow)
return;
- fclose(m_file);
+ if (m_file)
+ fclose(m_file);
}
PassOwnPtr<FilePrintStream> FilePrintStream::open(const char* filename, const char* mode)