]> git.cworth.org Git - sup/commitdiff
minor bugfix: protect call to BufferManager#flash on hook error
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 24 Feb 2008 19:45:06 +0000 (11:45 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Sun, 24 Feb 2008 19:45:06 +0000 (11:45 -0800)
lib/sup/hook.rb

index 98fcf57bec51116ea85ba265a8117af868bbd1af..74ecfabefc6e69da993b203bbe2e4f717299ce38 100644 (file)
@@ -86,7 +86,7 @@ class HookManager
       log "error running hook: #{e.message}"
       log e.backtrace.join("\n")
       @hooks[name] = nil # disable it
-      BufferManager.flash "Error running hook: #{e.message}"
+      BufferManager.flash "Error running hook: #{e.message}" if BufferManager.instantiated?
     end
     context.__cleanup
     result