diff --git a/src/corelib/text/qbytedata_p.h b/src/corelib/text/qbytedata_p.h index 77f351cbb4..3c36085021 100644 --- a/src/corelib/text/qbytedata_p.h +++ b/src/corelib/text/qbytedata_p.h @@ -244,6 +244,8 @@ public: inline char getChar() { + Q_ASSERT_X(!isEmpty(), "QByteDataBuffer::getChar", + "Cannot read a char from an empty buffer!"); char c; read(&c, 1); return c;