aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStefan Kristiansson2014-11-22 10:01:27 +0200
committerStefan Kristiansson2014-11-22 10:02:42 +0200
commit3fb4ab1377d15bb0fca78c5964531d3f2d49f986 (patch)
tree8096f67ca53eae93268af2e742b48e855e58158b /common
parentf94f48ae2bdd3ad596c6bdf6a9875461079d4a7b (diff)
downloadscummvm-rg350-3fb4ab1377d15bb0fca78c5964531d3f2d49f986.tar.gz
scummvm-rg350-3fb4ab1377d15bb0fca78c5964531d3f2d49f986.tar.bz2
scummvm-rg350-3fb4ab1377d15bb0fca78c5964531d3f2d49f986.zip
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).
Diffstat (limited to 'common')
-rwxr-xr-x[-rw-r--r--]common/xmlparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp
index c80d5e15be..67a3d36cec 100644..100755
--- 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() {