From 2bb499e5a7f7b596d873d89c26862240a3c18a89 Mon Sep 17 00:00:00 2001 From: dchandler Date: Sat, 26 Jul 2003 00:53:59 +0000 Subject: [PATCH] This was dying with a NullPointerException when you started it up using 'ant tt-run' with no dictionary. Now it starts up and shows you a nice error message, "Dictionary could not be loaded!", instead. --- source/org/thdl/tib/scanner/ScannerPanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/org/thdl/tib/scanner/ScannerPanel.java b/source/org/thdl/tib/scanner/ScannerPanel.java index 1b46355..33560d6 100644 --- a/source/org/thdl/tib/scanner/ScannerPanel.java +++ b/source/org/thdl/tib/scanner/ScannerPanel.java @@ -70,7 +70,7 @@ public abstract class ScannerPanel extends Panel implements ActionListener } catch (Exception e) { - status.setText("Dictionary could no be loaded!"); + status.setText("Dictionary could not be loaded!"); exito=false; } add(panel1, BorderLayout.NORTH); @@ -88,6 +88,7 @@ public abstract class ScannerPanel extends Panel implements ActionListener { int rows, n; + if (null == scanner) return null; String dictionaries[] = scanner.getDictionaryDescriptions(); if (dictionaries!=null) {