addendum to f56da9893: don't crash when s->sink is NULL
authorLennart Poettering <lennart@poettering.net>
Thu, 12 Feb 2009 02:42:28 +0000 (03:42 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 12 Feb 2009 02:42:28 +0000 (03:42 +0100)
src/modules/module-suspend-on-idle.c

index 22d49f7..a5a3571 100644 (file)
@@ -160,6 +160,9 @@ static pa_hook_result_t sink_input_unlink_hook_cb(pa_core *c, pa_sink_input *s,
     pa_sink_input_assert_ref(s);
     pa_assert(u);
 
+    if (!s->sink)
+        return PA_HOOK_OK;
+
     if (pa_sink_check_suspend(s->sink) <= 0) {
         struct device_info *d;
         if ((d = pa_hashmap_get(u->device_infos, s->sink)))