summaryrefslogtreecommitdiffstats
path: root/heimdall-frontend/source/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'heimdall-frontend/source/mainwindow.cpp')
-rw-r--r--heimdall-frontend/source/mainwindow.cpp4
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('.'));