From: Sergey Borovkov Date: Tue, 1 Mar 2016 15:22:37 +0000 (+0300) Subject: qml: Fix leak of the OpenGL contexts X-Git-Tag: 1.19.3~509^2~1695^2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2f17d48345f7cbcaeea1d898549adc28a7a178d;p=platform%2Fupstream%2Fgstreamer.git qml: Fix leak of the OpenGL contexts [Matthew Waters]: add NULL checks before unreffing https://bugzilla.gnome.org/show_bug.cgi?id=762999 --- diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc index 57b7bc9..e1f91e7 100644 --- a/ext/qt/qtitem.cc +++ b/ext/qt/qtitem.cc @@ -172,7 +172,10 @@ QtGLVideoItem::QtGLVideoItem() QtGLVideoItem::~QtGLVideoItem() { g_mutex_clear (&this->priv->lock); - + if (this->priv->context) + gst_object_unref(this->priv->context); + if (this->priv->other_context) + gst_object_unref(this->priv->other_context); g_free (this->priv); this->priv = NULL; }