[vlc-commits] GTK: don't leak Cairo contexts

Cheng Sun git at videolan.org
Mon Jan 23 19:28:35 CET 2012


npapi-vlc | branch: master | Cheng Sun <chengsun9 at gmail.com> | Sat Jan 21 10:47:39 2012 +0000| [f64fea4922605855dd1ecb82acd87cdb67a95ba5] | committer: Cheng Sun

GTK: don't leak Cairo contexts

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=f64fea4922605855dd1ecb82acd87cdb67a95ba5
---

 npapi/vlcplugin_gtk.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/npapi/vlcplugin_gtk.cpp b/npapi/vlcplugin_gtk.cpp
index fe0a01f..09d70ad 100644
--- a/npapi/vlcplugin_gtk.cpp
+++ b/npapi/vlcplugin_gtk.cpp
@@ -287,6 +287,7 @@ static bool video_expose_handler(GtkWidget *widget, GdkEvent *event, gpointer us
             (winwidth-iconwidth)/2.0, (winheight-iconheight)/2.0);
     gdk_cairo_region(cr, event_expose->region);
     cairo_fill(cr);
+    cairo_destroy(cr);
 
     return true;
 }



More information about the vlc-commits mailing list