Created
October 15, 2013 12:57
-
-
Save knocte/6991196 to your computer and use it in GitHub Desktop.
call g_return_val_if_fail earlier to avoid connecting to a signal of a NULL object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libbanshee/banshee-player-pipeline.c b/libbanshee/banshee-player-pipeline.c | |
index 28bae33..1222142 100644 | |
--- a/libbanshee/banshee-player-pipeline.c | |
+++ b/libbanshee/banshee-player-pipeline.c | |
@@ -294,13 +294,13 @@ _bp_pipeline_construct (BansheePlayer *player) | |
// source and decoder elements) based on source URI and stream content | |
player->playbin = gst_element_factory_make ("playbin", "playbin"); | |
+ g_return_val_if_fail (player->playbin != NULL, FALSE); | |
+ | |
// FIXME: Connect a proxy about-to-finish callback that will generate a next-track-starting callback. | |
// This can be removed once playbin generates its own next-track signal. | |
// bgo#584987 - this is included in >= 0.10.26 | |
g_signal_connect (player->playbin, "about-to-finish", G_CALLBACK (bp_about_to_finish_callback), player); | |
- g_return_val_if_fail (player->playbin != NULL, FALSE); | |
- | |
g_signal_connect (player->playbin, "notify::volume", G_CALLBACK (bp_volume_changed_callback), player); | |
g_signal_connect (player->playbin, "video-changed", G_CALLBACK (playbin_stream_changed_cb), player); | |
g_signal_connect (player->playbin, "audio-changed", G_CALLBACK (playbin_stream_changed_cb), player); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment