diff -r fcece45ef507 -r 79de32ba3296 src/corelib/io/qiodevice.cpp --- a/src/corelib/io/qiodevice.cpp Mon May 03 13:17:34 2010 +0300 +++ b/src/corelib/io/qiodevice.cpp Fri May 14 16:40:13 2010 +0300 @@ -755,6 +755,7 @@ qint64 QIODevice::read(char *data, qint64 maxSize) { Q_D(QIODevice); + CHECK_READABLE(read, qint64(-1)); #if defined QIODEVICE_DEBUG printf("%p QIODevice::read(%p, %d), d->pos = %d, d->buffer.size() = %d\n",