Prevent EmptyStackException in case no stack of prompts is empty
This commit is contained in:
parent
fc4aabde75
commit
703d7d3fd9
|
@ -43,7 +43,9 @@ public class ShellPrompts {
|
||||||
* @see #pushPrompt(String)
|
* @see #pushPrompt(String)
|
||||||
*/
|
*/
|
||||||
public void popPrompt() {
|
public void popPrompt() {
|
||||||
this.prompts.pop();
|
if (!this.prompts.isEmpty()) {
|
||||||
|
this.prompts.pop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue