Unregister timeouts on object destruction so we don't get any crashes.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4348 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx
index d0cf014..e225119 100644
--- a/vncviewer/DesktopWindow.cxx
+++ b/vncviewer/DesktopWindow.cxx
@@ -58,6 +58,12 @@
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)