aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml/node.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/node.rb')
-rw-r--r--lib/rexml/node.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/node.rb b/lib/rexml/node.rb
index 9f51b51fc1..5f414c03ef 100644
--- a/lib/rexml/node.rb
+++ b/lib/rexml/node.rb
@@ -25,7 +25,7 @@ module REXML
end
def indent to, ind
- if @parent and not @parent.context[:indentstyle].nil? then
+ if @parent and @parent.context and not @parent.context[:indentstyle].nil? then
indentstyle = @parent.context[:indentstyle]
else
indentstyle = ' '