diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-02-02 10:19:38 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-02-02 10:19:38 +0000 |
commit | 1474d866bcc0a1a0e6d3d2ad4afd9e80993c2b4a (patch) | |
tree | 0e741eca49b9b6b7624bbc5080c9dbb3405d09ed | |
parent | 6300c130df1fa09b234425d2026ca1639a13f956 (diff) | |
download | gstreamer-plugins-base-1474d866bcc0a1a0e6d3d2ad4afd9e80993c2b4a.tar.gz |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gst-libs/gst/play/play.c | 15 |
2 files changed, 16 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2004-02-02 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst-libs/gst/play/play.c: (gst_play_new): + check for GError + 2004-02-01 Julien MOUTTE <julien@moutte.net> * gst-libs/gst/play/play.c: (gst_play_seek_to_time), diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c index ba100fb3d..46738fd16 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; } |