summaryrefslogtreecommitdiffstats
path: root/ext/hal/hal.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/hal/hal.c')
-rw-r--r--ext/hal/hal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/hal/hal.c b/ext/hal/hal.c
index 519258d6..57da8425 100644
--- a/ext/hal/hal.c
+++ b/ext/hal/hal.c
@@ -50,6 +50,12 @@ gst_hal_get_string (const gchar * udi)
LibHalContext *ctx;
char *string;
+ /* Don't query HAL for NULL UDIs. Passing NULL as UDI to HAL gives
+ * an assertion failure in D-Bus when running with
+ * DBUS_FATAL_WARNINGS=1. */
+ if (!udi)
+ return NULL;
+
dbus_error_init (&error);
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);