Reset pointers in menus
This commit is contained in:
parent
5fc98e4ed0
commit
cd06896b2d
1 changed files with 4 additions and 1 deletions
|
@ -262,9 +262,12 @@ FGPUIMenuBar::destroy_menubar ()
|
||||||
// plib.
|
// plib.
|
||||||
SG_LOG(SG_GENERAL, SG_BULK, "Deleting char arrays");
|
SG_LOG(SG_GENERAL, SG_BULK, "Deleting char arrays");
|
||||||
for (i = 0; i < _char_arrays.size(); i++) {
|
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
|
free(_char_arrays[i][j]); // added with strdup
|
||||||
|
_char_arrays[i][j] = 0;
|
||||||
|
}
|
||||||
delete[] _char_arrays[i];
|
delete[] _char_arrays[i];
|
||||||
|
_char_arrays[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete all the callback arrays
|
// Delete all the callback arrays
|
||||||
|
|
Loading…
Add table
Reference in a new issue