diff --git a/src/corelib/text/qbytedata_p.h b/src/corelib/text/qbytedata_p.h index 946f9155ffd..46eee13ccd4 100644 --- a/src/corelib/text/qbytedata_p.h +++ b/src/corelib/text/qbytedata_p.h @@ -105,6 +105,7 @@ public: // preferably use this function to read data. inline QByteArray read() { + Q_ASSERT(!isEmpty()); squeezeFirst(); bufferCompleteSize -= buffers.first().size(); return buffers.takeFirst();