mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-30 05:29:47 +00:00
Fixed memory leak
This commit is contained in:
parent
5101b7849a
commit
2dbbdcd192
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user