diff options
Diffstat (limited to 'libjava/classpath/javax/swing/text/DefaultStyledDocument.java')
-rw-r--r-- | libjava/classpath/javax/swing/text/DefaultStyledDocument.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libjava/classpath/javax/swing/text/DefaultStyledDocument.java b/libjava/classpath/javax/swing/text/DefaultStyledDocument.java index 4ed8aa2d264..341579e3df8 100644 --- a/libjava/classpath/javax/swing/text/DefaultStyledDocument.java +++ b/libjava/classpath/javax/swing/text/DefaultStyledDocument.java @@ -1158,6 +1158,9 @@ public class DefaultStyledDocument extends AbstractDocument implements private void insertElement(ElementSpec spec) { + if (elementStack.isEmpty()) + return; + Edit edit = (Edit) elementStack.peek(); switch (spec.getType()) { |