Shortcut non latex/mathml text rendering 87/13087/3
Bruno JOFRET [Wed, 6 Nov 2013 10:15:20 +0000 (11:15 +0100)]
Change-Id: Ibf760f09dd633773109e4528125041a4dbd1bb23

scilab/modules/console/src/java/org/scilab/modules/console/utils/ScilabSpecialTextUtilities.java

index a4abc2e..064c825 100644 (file)
@@ -63,7 +63,13 @@ public final class ScilabSpecialTextUtilities {
                 icon = compileMathMLExpression(text, component.getFont().getSize());
             }
         }
-
+        
+        if (icon == null) {
+            // Shortcut when we are sure text is
+            // neither Latex nor MathML
+            return false;
+        }
+        
         try {
             setIcon(component, icon);
         } catch (InvocationTargetException e) {