Prevent EmptyStackException in case no stack of prompts is empty

This commit is contained in:
Christian Dupuis 2014-02-16 14:05:25 +01:00
parent fc4aabde75
commit 703d7d3fd9
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@ public class ShellPrompts {
* @see #pushPrompt(String)
*/
public void popPrompt() {
this.prompts.pop();
if (!this.prompts.isEmpty()) {
this.prompts.pop();
}
}
/**