From: John Darrington Date: Fri, 12 Aug 2016 16:40:23 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/master' into sheet X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8a262a5ea1c5011eeb42d72365620f53ee1a7bc;hp=4246294842a8abedecaaf55aa87507225f03f58c;p=pspp Merge remote-tracking branch 'origin/master' into sheet --- diff --git a/src/ui/gui/main.c b/src/ui/gui/main.c index 2d90ce8fd2..4716b1fa4d 100644 --- a/src/ui/gui/main.c +++ b/src/ui/gui/main.c @@ -94,7 +94,7 @@ static GSourceFuncs init_funcs = -GtkWidget *wsplash; +GtkWidget *wsplash = 0; gint64 start_time = 0; @@ -202,6 +202,7 @@ destroy_splash (gpointer ud) { GtkWidget *sp = GTK_WIDGET (ud); gtk_widget_destroy (sp); + wsplash = NULL; return G_SOURCE_REMOVE; } @@ -211,18 +212,21 @@ on_activate (GApplication * app, gpointer ud) post_initialise (app); GtkWindow *x = create_data_window (); - gtk_window_set_transient_for (GTK_WINDOW (wsplash), GTK_WINDOW (x)); - gtk_application_add_window (GTK_APPLICATION (app), x); - gtk_application_add_window (GTK_APPLICATION (app), GTK_WINDOW (wsplash)); - gtk_window_set_keep_above (GTK_WINDOW (wsplash), TRUE); - gtk_window_present (GTK_WINDOW (wsplash)); - - /* Remove the splash screen after SPLASH_DURATION milliseconds */ - gint64 elapsed_time = (g_get_monotonic_time () - start_time) / 1000; - if (SPLASH_DURATION - elapsed_time <= 0) - destroy_splash (wsplash); - else - g_timeout_add (SPLASH_DURATION - elapsed_time, destroy_splash, wsplash); + if (wsplash) + { + gtk_window_set_transient_for (GTK_WINDOW (wsplash), GTK_WINDOW (x)); + gtk_application_add_window (GTK_APPLICATION (app), x); + gtk_application_add_window (GTK_APPLICATION (app), GTK_WINDOW (wsplash)); + gtk_window_set_keep_above (GTK_WINDOW (wsplash), TRUE); + gtk_window_present (GTK_WINDOW (wsplash)); + + /* Remove the splash screen after SPLASH_DURATION milliseconds */ + gint64 elapsed_time = (g_get_monotonic_time () - start_time) / 1000; + if (SPLASH_DURATION - elapsed_time <= 0) + destroy_splash (wsplash); + else + g_timeout_add (SPLASH_DURATION - elapsed_time, destroy_splash, wsplash); + } } diff --git a/src/ui/gui/psppire-dict.c b/src/ui/gui/psppire-dict.c index 53ba83aa1d..0a0c3ae0b4 100644 --- a/src/ui/gui/psppire-dict.c +++ b/src/ui/gui/psppire-dict.c @@ -769,11 +769,11 @@ tree_model_iter_next (GtkTreeModel *model, GtkTreeIter *iter) struct variable *var; gint idx; - g_return_val_if_fail (iter->stamp == dict->stamp, FALSE); - if ( iter == NULL || iter->user_data == NULL) return FALSE; + g_return_val_if_fail (iter->stamp == dict->stamp, FALSE); + var = iter->user_data; idx = var_get_dict_index (var);