Call Button_Quit and Button_Page with correct enum
These functions are called explicitly in a few places and need to be handed the corresponding enum value to correctly get the button value. Since they were previously called with -1, they would cause segfaults. These seemed to happen when restoring backups or loading images to both pages.
This commit is contained in:
@@ -679,7 +679,7 @@ void Button_Quit(int btn)
|
||||
{
|
||||
if (Spare.image_is_modified)
|
||||
{
|
||||
Button_Page(btn); // On passe sur le brouillon
|
||||
Button_Page(BUTTON_PAGE); // On passe sur le brouillon
|
||||
// Si l'utilisateur présente les derniers symptomes de l'abandon
|
||||
if (Button_Quit_local_function())
|
||||
Quitting=1;
|
||||
@@ -691,7 +691,7 @@ void Button_Quit(int btn)
|
||||
if ( (Menu_is_visible) && (Mouse_Y+8>Menu_Y) )
|
||||
Hide_cursor();
|
||||
|
||||
Unselect_button(BUTTON_QUIT);
|
||||
Unselect_button(btn);
|
||||
|
||||
if ( (Menu_is_visible) && (Mouse_Y+8>Menu_Y) )
|
||||
Display_cursor();
|
||||
|
||||
Reference in New Issue
Block a user