]> source.dussan.org Git - tigervnc.git/commitdiff
Check that we have a cursor to restore
authorPierre Ossman <ossman@cendio.se>
Mon, 17 Mar 2014 13:29:49 +0000 (14:29 +0100)
committerPierre Ossman <ossman@cendio.se>
Mon, 7 Jul 2014 11:27:07 +0000 (13:27 +0200)
Forgot to check that we actually have a cursor from the server
before trying to switch back to it after dismissing the context menu.

vncviewer/Viewport.cxx

index 4b8a85b04eeb247b6a1810bc6be6088b05116efe..733e4a203d70e2fa7e96400565bc7c1f9f1caef4 100644 (file)
@@ -931,7 +931,7 @@ void Viewport::popupContextMenu()
 
   // Back to our proper mouse pointer.
 #ifdef HAVE_FLTK_CURSOR
-  if (Fl::belowmouse() == this)
+  if ((Fl::belowmouse() == this) && cursor)
     window()->cursor(cursor, cursorHotspot.x, cursorHotspot.y);
 #endif