Fixed memory leak

This commit is contained in:
Uwe Seimet 2022-02-18 19:24:49 +01:00
parent 5101b7849a
commit 2dbbdcd192
1 changed files with 5 additions and 1 deletions

View File

@ -545,7 +545,11 @@ void DetachAll()
{
Device *map[devices.size()];
for (size_t i = 0; i < devices.size(); i++) {
map[i] = NULL;
Device *device = map[i];
if (device) {
delete device;
map[i] = NULL;
}
}
if (MapController(map)) {