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).
This commit is contained in:
Stefan Kristiansson 2014-11-22 10:01:27 +02:00
parent f94f48ae2b
commit 3fb4ab1377

2
common/xmlparser.cpp Normal file → Executable file
View File

@ -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() {