docs: Prevent potential NULL pointer dereference when serializing plugin object types

CID 1464007

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/516>
This commit is contained in:
Sebastian Dröge 2020-06-06 10:19:57 +03:00 committed by GStreamer Merge Bot
parent 221cb03664
commit 5e8e847687

View file

@ -239,7 +239,7 @@ _serialize_object (GString * json, GHashTable * seen_other_types, GType gtype)
g_string_append_c (json, '}');
if (other_types->len) {
if (other_types && other_types->len) {
g_string_append_printf (json, ",%s", other_types->str);
}
g_string_free (other_types, TRUE);