GNOME Bugzilla – Bug 771875
display: Fix possible crash on startup
Last modified: 2016-09-24 00:47:24 UTC
.
Created attachment 336155 [details] [review] display: Fix possible crash on startup If no items are added to the GVariantBuilder, g_variant_builder_close() would throw a critical, g_variant_builder_end() would throw a segmentation fault. As this can only happen when there are no items added to the output_ids hashtable, this should only happen if there are no displays known to libgnome-desktop (and therefore mutter). See https://bugzilla.redhat.com/show_bug.cgi?id=1280075
Review of attachment 336155 [details] [review]: If I'm reading the gvariant docs correctly, I think replacing G_VARIANT_TYPE_ARRAY which is an indefinite type with the actual array type "a{uv}" would allows us to create an empty array. But logically, this looks good, since there's no point in even calling the dbus api if we have no output infos.
Attachment 336155 [details] pushed as 8da6fa2 - display: Fix possible crash on startup