作図ソフト dia の改良版
Revision | 51fed7c8451e50c3e3d8800c507254536be85d91 (tree) |
---|---|
Zeit | 2014-08-25 00:56:03 |
Autor | Hans Breuer <hans@breu...> |
Commiter | Hans Breuer |
Bug 735303 - Don't create empty groups from VDX
Fixed in the VDX plug-in itself but also on the lib API level
with g_return_val_if_fail (objects != NULL, NULL);
(cherry picked from commit ec4dbbcbc21e1233e46ba9ae059a18bed459ca24)
@@ -314,6 +314,9 @@ group_create(GList *objects) | ||
314 | 314 | GList *list; |
315 | 315 | int num_conn; |
316 | 316 | |
317 | + /* it's a programmer's error to create a group of nothing */ | |
318 | + g_return_val_if_fail (objects != NULL, NULL); | |
319 | + | |
317 | 320 | group = g_new0(Group,1); |
318 | 321 | obj = &group->object; |
319 | 322 |
@@ -2687,7 +2687,8 @@ vdx_plot_shape(struct vdx_Shape *Shape, GSList *objects, | ||
2687 | 2687 | if (child->data) group = g_list_append(group, child->data); |
2688 | 2688 | } |
2689 | 2689 | |
2690 | - objects = g_slist_append(objects, create_standard_group(group)); | |
2690 | + if (group) /* the above might leave us empty - ignore it: bug 735303 */ | |
2691 | + objects = g_slist_append(objects, create_standard_group(group)); | |
2691 | 2692 | /* g_list_free(group); */ |
2692 | 2693 | g_slist_free(members); |
2693 | 2694 | } |