GNOME Bugzilla – Bug 788520
device-provider: gst_device_provider_unhide_provider() always fails
Last modified: 2017-10-05 08:46:43 UTC
In File: gstdeviceprovider.c Function: gst_device_provider_unhide_provider Line no.:717 Condition 'unhidden_name!=0' is always false resulting in function always returning error. --------------------- void gst_device_provider_unhide_provider (GstDeviceProvider * provider, const gchar * name) { GList *find; gchar *unhidden_name = NULL; g_return_if_fail (GST_IS_DEVICE_PROVIDER (provider)); g_return_if_fail (unhidden_name != NULL); ---------------------- g_return_if_fail: is used for verifying that the expression (usually representing a precondition) evaluates to TRUE. Hence, the control will never go down the function. Solution : Remove statement g_return_if_fail (unhidden_name != NULL);
(In reply to Ashish Kumar from comment #0) > Solution : Remove statement > g_return_if_fail (unhidden_name != NULL); No, the assert was suppose to check the "name" variable. Clearly though this code was never tested / reached.
Can I submit a patch ?
Of course, it's always pretty appreciated. If you have the time to actually test this feature, that would be even better.
Created attachment 360945 [details] [review] Patch to fix the issue attached Please review the attached patch and share the feedback.
Thanks, pushed: commit 0ca70247fc4ebca257e9f911997a7bee820d4468 (HEAD -> master) Author: Ashish Kumar <kr.ashish@samsung.com> Date: Thu Oct 5 10:24:24 2017 +0530 device-provider: gst_device_provider_unhide_provider() always fails https://bugzilla.gnome.org/show_bug.cgi?id=788520