fix a stack corruption
Gui 2 dialogs set the value passed to register_integer to the widgets value when the dialog is closed. So they must live linger than the dialog. In thise case a local variable of the dialogs constructor was passed to register_integer which caused a stack corruption.
This commit is contained in:
parent
04c8aacee1
commit
f16dec91b9
1 changed files with 3 additions and 2 deletions
|
@ -62,7 +62,7 @@ teditor_edit_side::teditor_edit_side(int side,
|
|||
bool& shroud,
|
||||
bool& share_maps,
|
||||
team::CONTROLLER& controller,
|
||||
int controller_num,
|
||||
int /*controller_num*/,
|
||||
bool& no_leader,
|
||||
bool& hidden)
|
||||
: controller_(controller)
|
||||
|
@ -80,7 +80,8 @@ teditor_edit_side::teditor_edit_side(int side,
|
|||
register_integer("village_income", true, village_income);
|
||||
register_integer("village_support", true, village_support);
|
||||
|
||||
register_integer("controller_number_player", true, controller_num);
|
||||
//The following line is outommented becasue it causes crashs.
|
||||
//register_integer("controller_number_player", true, controller_num);
|
||||
|
||||
register_bool("fog", true, fog);
|
||||
register_bool("share_view", true, share_view);
|
||||
|
|
Loading…
Add table
Reference in a new issue