[gnome-games/gnome-2-26] Handle gst_element_factory_make() returning NULL (Bug #576745)
- From: Robert Ancell <rancell src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/gnome-2-26] Handle gst_element_factory_make() returning NULL (Bug #576745)
- Date: Sun, 26 Apr 2009 21:13:08 -0400 (EDT)
commit 896a149b8cd1cec05d885872dbd5ddbab4ca2fb0
Author: Robert Ancell <robert ancell gmail com>
Date: Mon Apr 27 11:12:48 2009 +1000
Handle gst_element_factory_make() returning NULL (Bug #576745)
---
libgames-support/games-sound.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libgames-support/games-sound.c b/libgames-support/games-sound.c
index 587f7be..352a41b 100644
--- a/libgames-support/games-sound.c
+++ b/libgames-support/games-sound.c
@@ -135,6 +135,8 @@ games_sound_init (void)
g_assert (g_thread_supported ());
pipeline = gst_element_factory_make ("playbin", "playbin");
+ if (pipeline == NULL)
+ return;
threads = g_thread_pool_new ((GFunc) games_sound_thread_run,
NULL, 10, FALSE, &err);
@@ -201,7 +203,8 @@ games_sound_play (const gchar * filename)
if (!sound_init)
games_sound_init ();
- g_thread_pool_push (threads, (gchar *) filename, &err);
+ if (sound_init)
+ g_thread_pool_push (threads, (gchar *) filename, &err);
#elif defined(HAVE_SDL_MIXER)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]