Fix potential null pointer exception if cursor hotspot isn't available
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4886 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/com/tigervnc/vncviewer/DesktopWindow.java b/java/com/tigervnc/vncviewer/DesktopWindow.java
index 362c47a..3aa0dfd 100644
--- a/java/com/tigervnc/vncviewer/DesktopWindow.java
+++ b/java/com/tigervnc/vncviewer/DesktopWindow.java
@@ -128,6 +128,9 @@
hideLocalCursor();
+ if (hotspot == null)
+ hotspot = new Point(0, 0);
+
cursor.hotspot = hotspot;
Dimension bsc = tk.getBestCursorSize(w, h);