From cec4f7d524ca6bedd76d890d9a9d067f98e71ccb Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 13 Mar 2012 15:51:41 +0100 Subject: [PATCH] bineditor: close file before doing anything complex Change-Id: I7f29515d903cb1109f2c15c2d36cf43b77285c4f Reviewed-by: Daniel Teske --- src/plugins/bineditor/bineditorplugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp index c7399d46e2a..9a26c4a1cbe 100644 --- a/src/plugins/bineditor/bineditorplugin.cpp +++ b/src/plugins/bineditor/bineditorplugin.cpp @@ -258,11 +258,11 @@ private slots: int blockSize = m_editor->dataBlockSize(); file.seek(block * blockSize); QByteArray data = file.read(blockSize); + file.close(); const int dataSize = data.size(); if (dataSize != blockSize) data += QByteArray(blockSize - dataSize, 0); m_editor->addData(block, data); - file.close(); } else { QMessageBox::critical(Core::ICore::mainWindow(), tr("File Error"), tr("Cannot open %1: %2").arg(