summaryrefslogtreecommitdiffstats
path: root/lib/rexml/node.rb
diff options
context:
space:
mode:
authorser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-16 22:24:45 +0000
committerser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-16 22:24:45 +0000
commitcc042b0ca6aa136fca967b11cff8b57fa568344e (patch)
treec21d8a7e9c3b58befcd8ac2eee5b18416384c9ff /lib/rexml/node.rb
parenta2428e6f6b08b37179d2856332b0d4a21568469a (diff)
downloadruby-cc042b0ca6aa136fca967b11cff8b57fa568344e.tar.gz
ruby-cc042b0ca6aa136fca967b11cff8b57fa568344e.tar.xz
ruby-cc042b0ca6aa136fca967b11cff8b57fa568344e.zip
Issue11: null context causing indentation crash
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 9f51b51fc..5f414c03e 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 = ' '