1
0
Fork 0
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:
Charles Kerr 2010-12-19 09:50:28 +00:00
parent 5bf05ab31b
commit 3a6cf6afc9

View file

@ -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 ) );
}
}