From 31d63005e2937f7712a515f56645fe3c34628ca8 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 27 Jul 2014 00:08:34 -0500 Subject: in sound.cpp, check the return value of gst_init_check() --- src/sound.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sound.cpp b/src/sound.cpp index bf2284e..052b168 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -49,8 +49,7 @@ public: static std::once_flag once; std::call_once(once, [](){ GError* error = nullptr; - gst_init_check (nullptr, nullptr, &error); - if (error) + if (!gst_init_check (nullptr, nullptr, &error)) { g_critical("Unable to play alarm sound: %s", error->message); g_error_free(error); -- cgit v1.2.3