forked from quickshell/quickshell
		
	fix(stream): segfault for datastream with no reader
This commit is contained in:
		
							parent
							
								
									bccf43f1f7
								
							
						
					
					
						commit
						cd2343e57d
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue