summaryrefslogtreecommitdiff
path: root/src/org/unitConverter
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/unitConverter')
-rwxr-xr-xsrc/org/unitConverter/converterGUI/UnitConverterGUI.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/unitConverter/converterGUI/UnitConverterGUI.java b/src/org/unitConverter/converterGUI/UnitConverterGUI.java
index aecb64f..1f59e3a 100755
--- a/src/org/unitConverter/converterGUI/UnitConverterGUI.java
+++ b/src/org/unitConverter/converterGUI/UnitConverterGUI.java
@@ -216,6 +216,10 @@ final class UnitConverterGUI {
this.view.showErrorDialog("Parse Error", "Please enter a unit expression in the From: box.");
return;
}
+ if (toUnitString.isEmpty()) {
+ this.view.showErrorDialog("Parse Error", "Please enter a unit expression in the To: box.");
+ return;
+ }
// try to parse from
final Unit from;