From 22befe3d619bb5d915bc6c1dcd7dd35791054c79 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 5 Aug 2012 18:28:17 +0200 Subject: [PATCH] Owner: Prevent use of uninitialized variable. --- plugins/Owner/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Owner/plugin.py b/plugins/Owner/plugin.py index 6b31294f3..15fa098b3 100644 --- a/plugins/Owner/plugin.py +++ b/plugins/Owner/plugin.py @@ -459,7 +459,7 @@ class Owner(callbacks.Plugin): x = module.reload() try: module = plugin.loadPluginModule(name) - if hasattr(module, 'reload'): + if hasattr(module, 'reload') and 'x' in locals(): module.reload(x) for callback in callbacks: callback.die()