From 02a2b0046f0c969bcaf6b1fecf68a6f001e8cd4b Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Sat, 14 Dec 2002 05:27:01 +0000 Subject: protect against null instance_id's (bug#35540) 2002-12-13 Mike Kestner * gal-view-instance.c (gal_view_instance_construct): protect against null instance_id's (bug#35540) svn path=/trunk/; revision=19118 --- widgets/menus/gal-view-instance.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'widgets/menus/gal-view-instance.c') diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c index f227a020fd..e43fa92fb7 100644 --- a/widgets/menus/gal-view-instance.c +++ b/widgets/menus/gal-view-instance.c @@ -322,7 +322,11 @@ gal_view_instance_construct (GalViewInstance *instance, GalViewCollection *colle instance->collection_changed_id = g_signal_connect (collection, "changed", G_CALLBACK (collection_changed), instance); - instance->instance_id = g_strdup (instance_id); + + if (instance_id) + instance->instance_id = g_strdup (instance_id); + else + instance->instance_id = g_strdup (""); safe_id = g_strdup (instance->instance_id); e_filename_make_safe (safe_id); -- cgit