summaryrefslogtreecommitdiffstats
path: root/gst-libs
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-02-02 10:19:38 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-02-02 10:19:38 +0000
commit51345d50dff11d6fac850e399690235719676021 (patch)
tree606623195cb9830e4d2ec9100d77ca0d9d28e626 /gst-libs
parent119c42f201c5870562809a99d9a8f1c5679ad61a (diff)
downloadgst-plugins-bad-51345d50dff11d6fac850e399690235719676021.tar.gz
gst-plugins-bad-51345d50dff11d6fac850e399690235719676021.tar.bz2
gst-plugins-bad-51345d50dff11d6fac850e399690235719676021.zip
check for NULLness and warn if we can't report GError
Original commit message from CVS: check for NULLness and warn if we can't report GError
Diffstat (limited to 'gst-libs')
-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;
}