From c2f17d48345f7cbcaeea1d898549adc28a7a178d Mon Sep 17 00:00:00 2001 From: Sergey Borovkov Date: Tue, 1 Mar 2016 18:22:37 +0300 Subject: [PATCH] qml: Fix leak of the OpenGL contexts [Matthew Waters]: add NULL checks before unreffing https://bugzilla.gnome.org/show_bug.cgi?id=762999 --- ext/qt/qtitem.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.7.4