summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/play/play.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/play/play.c')
-rw-r--r--gst-libs/gst/play/play.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c
index ba100fb3..46738fd1 100644
--- a/gst-libs/gst/play/play.c
+++ b/gst-libs/gst/play/play.c
@@ -1133,12 +1133,19 @@ gst_play_new (GError **error)
{
GstPlay *play = g_object_new (GST_TYPE_PLAY, NULL);
- if ( (error) && (play->priv->error) )
+ if (play->priv->error)
{
- *error = play->priv->error;
- play->priv->error = NULL;
+ if (error)
+ {
+ *error = play->priv->error;
+ play->priv->error = NULL;
+ }
+ else
+ {
+ g_warning ("Error creating GstPlay object.\n%s", play->priv->error->message);
+ g_error_free (play->priv->error);
+ }
}
-
return play;
}