mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
(trunk gtk_) #3837 "Dangling pointer after quit cancel" -- fixed.
This commit is contained in:
parent
5bf05ab31b
commit
3a6cf6afc9
1 changed files with 4 additions and 2 deletions
|
@ -88,7 +88,7 @@ struct cbdata
|
|||
GSList * dupqueue;
|
||||
GSList * details;
|
||||
GtkTreeSelection * sel;
|
||||
GtkWidget * quit_dialog;
|
||||
gpointer quit_dialog;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -974,8 +974,10 @@ maybeaskquit( struct cbdata * cbdata )
|
|||
if( !shouldConfirmBeforeExiting( cbdata ) )
|
||||
wannaquit( cbdata );
|
||||
else {
|
||||
if( cbdata->quit_dialog == NULL )
|
||||
if( cbdata->quit_dialog == NULL ) {
|
||||
cbdata->quit_dialog = askquit( cbdata->core, cbdata->wind, wannaquit, cbdata );
|
||||
g_object_add_weak_pointer( G_OBJECT( cbdata->quit_dialog ), &cbdata->quit_dialog );
|
||||
}
|
||||
gtk_window_present( GTK_WINDOW( cbdata->quit_dialog ) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue