Avoid using NULL GtkSettings pointer

Seems to happen when running tests
This commit is contained in:
Paul Cornett 2017-11-25 11:00:31 -08:00
parent 23e3323655
commit 17de4e31fb

View File

@ -1036,10 +1036,13 @@ void wxSystemSettingsModule::OnExit()
{
#ifdef __WXGTK3__
GtkSettings* settings = gtk_settings_get_default();
g_signal_handlers_disconnect_by_func(settings,
(void*)notify_gtk_theme_name, NULL);
g_signal_handlers_disconnect_by_func(settings,
(void*)notify_gtk_font_name, NULL);
if (settings)
{
g_signal_handlers_disconnect_by_func(settings,
(void*)notify_gtk_theme_name, NULL);
g_signal_handlers_disconnect_by_func(settings,
(void*)notify_gtk_font_name, NULL);
}
#else
if (gs_tlw_parent)
{