qml/item: also unref the display on destruction
authorMatthew Waters <matthew@centricular.com>
Wed, 7 Dec 2016 11:55:46 +0000 (22:55 +1100)
committerMatthew Waters <matthew@centricular.com>
Wed, 7 Dec 2016 12:02:02 +0000 (23:02 +1100)
Leaking objects (and a thread!) is never a good idea.

https://bugzilla.gnome.org/show_bug.cgi?id=775746

ext/qt/qtitem.cc

index f088c76..8027c74 100644 (file)
@@ -136,6 +136,8 @@ QtGLVideoItem::~QtGLVideoItem()
     gst_object_unref(this->priv->context);
   if (this->priv->other_context)
     gst_object_unref(this->priv->other_context);
+  if (this->priv->display)
+    gst_object_unref(this->priv->display);
   g_free (this->priv);
   this->priv = NULL;
 }