diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c index fb7a86ee4f..94a23a0e62 100644 --- a/app/actions/file-commands.c +++ b/app/actions/file-commands.c @@ -522,11 +522,8 @@ file_open_dialog_show (Gimp *gimp, gimp_file_dialog_set_open_image (GIMP_FILE_DIALOG (dialog), image, open_as_layers); - parent = gtk_widget_get_toplevel (parent); - - if (GTK_IS_WINDOW (parent)) - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (parent)); + gtk_window_set_transient_for (GTK_WINDOW (dialog), + GTK_WINDOW (gtk_widget_get_toplevel (parent))); gtk_window_present (GTK_WINDOW (dialog)); }