summaryrefslogtreecommitdiff
path: root/tests/testfilechooserbutton.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testfilechooserbutton.c')
-rw-r--r--tests/testfilechooserbutton.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/testfilechooserbutton.c b/tests/testfilechooserbutton.c
index 11d7fea78c..f1c1ed3360 100644
--- a/tests/testfilechooserbutton.c
+++ b/tests/testfilechooserbutton.c
@@ -237,9 +237,12 @@ chooser_update_preview_cb (GtkFileChooser *chooser,
gchar *filename;
filename = gtk_file_chooser_get_preview_uri (chooser);
- g_message ("%s::update-preview\n\tPreview Filename: `%s'\nDone.\n",
- G_OBJECT_TYPE_NAME (chooser), filename);
- g_free (filename);
+ if (filename != NULL)
+ {
+ g_message ("%s::update-preview\n\tPreview Filename: `%s'\nDone.\n",
+ G_OBJECT_TYPE_NAME (chooser), filename);
+ g_free (filename);
+ }
}
@@ -358,7 +361,5 @@ main (int argc,
gtk_main ();
- gtk_widget_destroy (win);
-
return 0;
}