Cursor.st
changeset 133 ca8ce3916382
parent 115 1d93fd8c5371
child 144 cf645a1ebbb3
--- a/Cursor.st	Sun Apr 02 13:11:37 1995 +0200
+++ b/Cursor.st	Tue Apr 11 17:56:14 1995 +0200
@@ -28,7 +28,7 @@
 COPYRIGHT (c) 1992 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/Cursor.st,v 1.15 1995-03-07 21:55:19 claus Exp $
+$Header: /cvs/stx/stx/libview/Cursor.st,v 1.16 1995-04-11 15:54:27 claus Exp $
 '!
 
 !Cursor class methodsFor:'documentation'!
@@ -49,7 +49,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/Cursor.st,v 1.15 1995-03-07 21:55:19 claus Exp $
+$Header: /cvs/stx/stx/libview/Cursor.st,v 1.16 1995-04-11 15:54:27 claus Exp $
 "
 !
 
@@ -620,7 +620,7 @@
     "create a new Cursor representing the same cursor as
      myself on aDevice. Dont search the lobby."
 
-    |newCursor id|
+    |newCursor id sF mF|
 
     "ask that device for the cursor"
     shape notNil ifTrue:[
@@ -630,8 +630,19 @@
 	    ^ nil
 	].
     ] ifFalse:[
-	sourceForm := sourceForm on:aDevice.
-	maskForm := maskForm on:aDevice.
+	sourceForm notNil ifTrue:[
+	    sF := sourceForm on:aDevice.
+	].
+	maskForm notNil ifTrue:[
+	    mF := maskForm on:aDevice.
+	].
+	(sF isNil or:[mF isNil]) ifTrue:[
+	    'CURSOR: cursor has no form' errorPrintNewline.
+	    ^ nil
+	].
+	sourceForm := sF.
+	maskForm := mF.
+
 	id := aDevice createCursorSourceForm:sourceForm
 				    maskForm:maskForm
 					hotX:hotX