mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
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
This commit is contained in:
parent
119c42f201
commit
51345d50df
2 changed files with 16 additions and 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>
|
2004-02-01 Julien MOUTTE <julien@moutte.net>
|
||||||
|
|
||||||
* gst-libs/gst/play/play.c: (gst_play_seek_to_time),
|
* gst-libs/gst/play/play.c: (gst_play_seek_to_time),
|
||||||
|
|
|
@ -1133,12 +1133,19 @@ gst_play_new (GError **error)
|
||||||
{
|
{
|
||||||
GstPlay *play = g_object_new (GST_TYPE_PLAY, NULL);
|
GstPlay *play = g_object_new (GST_TYPE_PLAY, NULL);
|
||||||
|
|
||||||
if ( (error) && (play->priv->error) )
|
if (play->priv->error)
|
||||||
{
|
{
|
||||||
*error = play->priv->error;
|
if (error)
|
||||||
play->priv->error = NULL;
|
{
|
||||||
|
*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;
|
return play;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue