mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
bus: Prevent gst_bus_add_watch_full_unlocked from a segfault if priv->poll == NULL
This happens if the process runs out of file descriptors. Better print a critical warning instead of just crashing. https://bugzilla.gnome.org/show_bug.cgi?id=762702
This commit is contained in:
parent
894c67e642
commit
5048155f57
1 changed files with 4 additions and 0 deletions
|
@ -892,6 +892,10 @@ gst_bus_add_watch_full_unlocked (GstBus * bus, gint priority,
|
|||
}
|
||||
|
||||
source = gst_bus_create_watch (bus);
|
||||
if (!source) {
|
||||
g_critical ("Creating bus watch failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (priority != G_PRIORITY_DEFAULT)
|
||||
g_source_set_priority (source, priority);
|
||||
|
|
Loading…
Reference in a new issue