1
0
Fork 0

Reset pointers in menus

This commit is contained in:
Frederic Bouvier 2012-06-10 22:25:58 +02:00
parent 5fc98e4ed0
commit cd06896b2d

View file

@ -262,9 +262,12 @@ FGPUIMenuBar::destroy_menubar ()
// plib.
SG_LOG(SG_GENERAL, SG_BULK, "Deleting char arrays");
for (i = 0; i < _char_arrays.size(); i++) {
for (int j = 0; _char_arrays[i][j] != 0; j++)
for (int j = 0; _char_arrays[i][j] != 0; j++) {
free(_char_arrays[i][j]); // added with strdup
_char_arrays[i][j] = 0;
}
delete[] _char_arrays[i];
_char_arrays[i] = 0;
}
// Delete all the callback arrays