]> source.dussan.org Git - tigervnc.git/commitdiff
Calling XShmDestroyReadDisplayBuf() on IrixOverlayShmImage cleanup.
authorConstantin Kaplinsky <const@tightvnc.com>
Mon, 6 Mar 2006 05:24:45 +0000 (05:24 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Mon, 6 Mar 2006 05:24:45 +0000 (05:24 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@502 3789f03b-4d11-0410-bbf8-ca57d06f2519

x0vncserver/Image.cxx

index 475cee19ee283342df63291c0cc59556ca40604f..ef7237895af3d7572fa4226d86b3cf86e8fb6f5f 100644 (file)
@@ -361,7 +361,6 @@ void IrixOverlayShmImage::Init(int width, int height)
     return;
 
   // FIXME: Check if the extension is available at run time.
-  // FIXME: Does XShmCreateReadDisplayBuf() require some cleanup?
   readDisplayBuf = XShmCreateReadDisplayBuf(dpy, NULL, shminfo, width, height);
 }
 
@@ -413,6 +412,9 @@ IrixOverlayShmImage::~IrixOverlayShmImage()
 {
   // DEBUG:
   // fprintf(stderr,"~IrixOverlayShmImage called\n");
+
+  if (readDisplayBuf != NULL)
+    XShmDestroyReadDisplayBuf(readDisplayBuf);
 }
 
 void IrixOverlayShmImage::get(Window wnd, int x, int y)