task: guard against NULL task function

https://bugzilla.gnome.org/show_bug.cgi?id=746439
This commit is contained in:
Prashant Gotarne 2015-03-19 15:55:14 +05:30 committed by Tim-Philipp Müller
parent c2e15651be
commit 03dccde1ef

View file

@ -414,6 +414,8 @@ gst_task_new (GstTaskFunction func, gpointer user_data, GDestroyNotify notify)
{
GstTask *task;
g_return_val_if_fail (func != NULL, NULL);
task = g_object_newv (GST_TYPE_TASK, 0, NULL);
task->func = func;
task->user_data = user_data;