(gtk) fix crash reported by hussam
This commit is contained in:
parent
3ecb9910e0
commit
bf75469bbe
|
@ -384,10 +384,10 @@ tr_core_new( void )
|
|||
TrCore * core = TR_CORE( g_object_new( TR_CORE_TYPE, NULL ) );
|
||||
|
||||
/* init from prefs & listen to pref changes */
|
||||
g_signal_connect( core, "prefs-changed", G_CALLBACK(prefsChanged), NULL );
|
||||
prefsChanged( core, PREF_KEY_SORT_MODE, NULL );
|
||||
prefsChanged( core, PREF_KEY_SORT_REVERSED, NULL );
|
||||
prefsChanged( core, PREF_KEY_MAX_PEERS_GLOBAL, NULL );
|
||||
g_signal_connect( core, "prefs-changed", G_CALLBACK(prefsChanged), NULL );
|
||||
|
||||
return core;
|
||||
}
|
||||
|
|
|
@ -303,11 +303,11 @@ tr_window_new( GtkUIManager * ui_manager, TrCore * core )
|
|||
gtk_widget_show_all( vbox );
|
||||
|
||||
/* listen for prefs changes that affect the window */
|
||||
p->core = core;
|
||||
prefsChanged( core, PREF_KEY_MINIMAL_VIEW, self );
|
||||
prefsChanged( core, PREF_KEY_STATUS_BAR, self );
|
||||
prefsChanged( core, PREF_KEY_STATUS_BAR_STATS, self );
|
||||
prefsChanged( core, PREF_KEY_TOOLBAR, self );
|
||||
p->core = core;
|
||||
p->pref_handler_id = g_signal_connect( core, "prefs-changed",
|
||||
G_CALLBACK(prefsChanged), self );
|
||||
|
||||
|
|
Loading…
Reference in New Issue