diff --git a/src/io/datastream.cpp b/src/io/datastream.cpp index 01a7364..c655921 100644 --- a/src/io/datastream.cpp +++ b/src/io/datastream.cpp @@ -35,6 +35,7 @@ void DataStream::onReaderDestroyed() { } void DataStream::onBytesAvailable() { + if (this->mReader == nullptr) return; auto buf = this->ioDevice()->readAll(); this->mReader->parseBytes(buf, this->buffer); }