summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp
index 904337b..724ba22 100644
--- a/src/corelib/io/qnoncontiguousbytedevice.cpp
+++ b/src/corelib/io/qnoncontiguousbytedevice.cpp
@@ -393,6 +393,12 @@ bool QNonContiguousByteDeviceIoDeviceImpl::reset()
if (device->seek(initialPosition)) {
eof = false; // assume eof is false, it will be true after a read has been attempted
totalAdvancements = 0; //reset the progress counter
+ if (currentReadBuffer) {
+ delete currentReadBuffer;
+ currentReadBuffer = 0;
+ }
+ currentReadBufferAmount = 0;
+ currentReadBufferPosition = 0;
return true;
}