diff options
author | Benjamin Dobell <benjamin.dobell+github@glassechidna.com.au> | 2016-03-01 07:57:37 +0100 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell+github@glassechidna.com.au> | 2016-03-01 07:57:37 +0100 |
commit | 2bab8d9473cc237f6665a9cfe784942e0a2038e8 (patch) | |
tree | 66290929ce2f418bc4140136751719fc01c565c2 /heimdall-frontend/source/mainwindow.cpp | |
parent | Merge pull request #287 from yan12125/allow-disable-gui (diff) | |
parent | - fixed possible null pointer access (diff) | |
download | Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.gz Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.bz2 Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.lz Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.xz Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.tar.zst Heimdall-2bab8d9473cc237f6665a9cfe784942e0a2038e8.zip |
Diffstat (limited to 'heimdall-frontend/source/mainwindow.cpp')
-rw-r--r-- | heimdall-frontend/source/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/heimdall-frontend/source/mainwindow.cpp b/heimdall-frontend/source/mainwindow.cpp index e110d69..f06fb4e 100644 --- a/heimdall-frontend/source/mainwindow.cpp +++ b/heimdall-frontend/source/mainwindow.cpp @@ -131,7 +131,7 @@ bool MainWindow::ReadPit(QFile *file) file->close(); bool success = currentPitData.Unpack(buffer); - delete buffer; + delete[] buffer; if (!success) currentPitData.Clear(); @@ -659,7 +659,7 @@ void MainWindow::SelectPartitionName(int index) partitionFileGroup->setTitle(title); - if (!fileInfo.GetFilename().isEmpty()) + if (pitEntry && !fileInfo.GetFilename().isEmpty()) { QString partitionFilename = pitEntry->GetFlashFilename(); int lastPeriod = partitionFilename.lastIndexOf(QChar('.')); |