forked from AuroraMiddleware/gtk
gtk-demo: Fix a crash in the puzzle
Avoid a crash when clicking the refresh button after solving the puzzle.
This commit is contained in:
parent
382153e82d
commit
cc878160bd
@ -355,11 +355,16 @@ reshuffle (void)
|
||||
{
|
||||
GtkWidget *grid;
|
||||
|
||||
grid = gtk_aspect_frame_get_child (GTK_ASPECT_FRAME (frame));
|
||||
if (solved)
|
||||
start_puzzle (puzzle);
|
||||
{
|
||||
start_puzzle (puzzle);
|
||||
grid = gtk_aspect_frame_get_child (GTK_ASPECT_FRAME (frame));
|
||||
}
|
||||
else
|
||||
shuffle_puzzle (grid);
|
||||
{
|
||||
grid = gtk_aspect_frame_get_child (GTK_ASPECT_FRAME (frame));
|
||||
shuffle_puzzle (grid);
|
||||
}
|
||||
gtk_widget_grab_focus (grid);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user