]> source.dussan.org Git - tigervnc.git/commitdiff
Unregister timeouts on object destruction so we don't get any crashes.
authorPierre Ossman <ossman@cendio.se>
Wed, 9 Mar 2011 11:53:08 +0000 (11:53 +0000)
committerPierre Ossman <ossman@cendio.se>
Wed, 9 Mar 2011 11:53:08 +0000 (11:53 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4348 3789f03b-4d11-0410-bbf8-ca57d06f2519

vncviewer/DesktopWindow.cxx

index d0cf014ce31287c839cfc09dc1945fde7a145716..e225119f57e95d7d72bd9d98eb1875d09569d026 100644 (file)
@@ -58,6 +58,12 @@ DesktopWindow::DesktopWindow(int w, int h, const char *name,
 
 DesktopWindow::~DesktopWindow()
 {
+  // Unregister all timeouts in case they get a change tro trigger
+  // again later when this object is already gone.
+  Fl::remove_timeout(handleUpdateTimeout, this);
+  Fl::remove_timeout(handleColourMap, this);
+  Fl::remove_timeout(handlePointerTimeout, this);
+
   delete frameBuffer;
 
   if (pixelTrans)