plugin: Fix possible dir enumerator NULL unref

On an unlikely chance that sink was compiled without any importers, iterated dir does not exists thus we try to unref a NULL. Avoid doing that.
This commit is contained in:
Rafał Dzięgiel
2022-05-07 13:43:51 +02:00
parent 7159459160
commit 5775738f67

View File

@@ -212,10 +212,11 @@ _obtain_available_importers (G_GNUC_UNUSED gpointer data)
GST_INFO ("Found importer: %s, caps: %" GST_PTR_FORMAT, module_name, data->caps);
g_ptr_array_add (importers, data);
}
g_object_unref (dir_enum);
}
g_object_unref (dir);
g_object_unref (dir_enum);
if (error) {
GST_ERROR ("Could not load importer, reason: %s",