We have no cursor initially, and never if the server doesn't support local
cursors, so make sure we don't pass a NULL pointer to FLTK.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4478 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 5ca9f0e..14feaf8 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -341,7 +341,8 @@
case FL_ENTER:
// Yes, we would like some pointer events please!
#ifdef HAVE_FLTK_CURSOR
- window()->cursor(cursor, cursorHotspot.x, cursorHotspot.y);
+ if (cursor)
+ window()->cursor(cursor, cursorHotspot.x, cursorHotspot.y);
#endif
return 1;