diff options
Diffstat (limited to 'src/org/unitConverter/converterGUI')
-rwxr-xr-x | src/org/unitConverter/converterGUI/UnitConverterGUI.java | 4 |
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; |