forked from quickshell/quickshell
fix(stream): segfault for datastream with no reader
This commit is contained in:
parent
bccf43f1f7
commit
cd2343e57d
|
@ -35,6 +35,7 @@ void DataStream::onReaderDestroyed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataStream::onBytesAvailable() {
|
void DataStream::onBytesAvailable() {
|
||||||
|
if (this->mReader == nullptr) return;
|
||||||
auto buf = this->ioDevice()->readAll();
|
auto buf = this->ioDevice()->readAll();
|
||||||
this->mReader->parseBytes(buf, this->buffer);
|
this->mReader->parseBytes(buf, this->buffer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue