From 3fb4ab1377d15bb0fca78c5964531d3f2d49f986 Mon Sep 17 00:00:00 2001 From: Stefan Kristiansson Date: Sat, 22 Nov 2014 10:01:27 +0200 Subject: COMMON: make XMLParser::loadStream() fail when stream is null Some users of this method relies on it to fail when an invalid stream is passed to it (E.g. VirtualKeyboard::openPack). --- common/xmlparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 common/xmlparser.cpp (limited to 'common/xmlparser.cpp') diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp old mode 100644 new mode 100755 index c80d5e15be..67a3d36cec --- a/common/xmlparser.cpp +++ b/common/xmlparser.cpp @@ -69,7 +69,7 @@ bool XMLParser::loadBuffer(const byte *buffer, uint32 size, DisposeAfterUse::Fla bool XMLParser::loadStream(SeekableReadStream *stream) { _stream = stream; _fileName = "File Stream"; - return true; + return _stream != nullptr; } void XMLParser::close() { -- cgit v1.2.3