summaryrefslogtreecommitdiff
path: root/plugins/Boltun/src/boltun.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Boltun/src/boltun.cpp')
-rw-r--r--plugins/Boltun/src/boltun.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index 4ad9379bb5..26a370b50e 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -163,8 +163,7 @@ static bool LoadMind(const TCHAR* filename, int &line)
delete mind;
return false;
}
- if (bot)
- delete bot;
+ delete bot;
bot = new TalkBot(*mind);
delete mind;
UpdateEngine();
@@ -408,7 +407,7 @@ static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
ofn.lpstrInitialDir = path;
if (!GetOpenFileName(&ofn))
{
- delete filename;
+ delete[] filename;
delete[] filt;
break;
}
@@ -427,7 +426,7 @@ static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
filename = f;
Config.MindFileName = filename;
SetDlgItemText(hwndDlg, IDC_MINDFILE, filename);
- delete origf;
+ delete[] origf;
}
case IDC_BTNRELOAD:
{