FontPanel.st
changeset 2287 b33ad40d7538
parent 2286 2a1a6b7cb322
child 2353 0d373c7046f7
--- a/FontPanel.st	Thu Sep 28 18:43:47 2000 +0200
+++ b/FontPanel.st	Fri Sep 29 09:42:44 2000 +0200
@@ -474,18 +474,17 @@
                           style:currentStyle
                           size:currentSize      
                           encoding:(fonts anElement encoding).
-            ] ifFalse:[
-                ^ self
             ]    
         ].
 
-        f := f onDevice:device.
-        previewField font:f.
+        f notNil ifTrue:[
+            f := f onDevice:device.
+            previewField font:f.
 
-        enc := f encoding.
-        enc isNil ifTrue:[enc := 'ascii ?'].
-        encodingLabel label:enc.
-
+            enc := f encoding.
+            enc isNil ifTrue:[enc := 'ascii ?'].
+            encodingLabel label:enc.
+        ].
         nameLabel notNil ifTrue:[nameLabel label:(f fullName)].
 
         (enc notNil and:[enc startsWith:'jis']) ifTrue:[
@@ -651,5 +650,5 @@
 !FontPanel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/FontPanel.st,v 1.49 2000-09-28 16:43:47 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/FontPanel.st,v 1.50 2000-09-29 07:42:44 cg Exp $'
 ! !