Owner: Prevent use of uninitialized variable.

(pulled from Limnoria)
This commit is contained in:
Daniel Folkinshteyn 2013-05-03 23:43:17 -04:00
parent bc0d16a4e1
commit 0b36a29977
1 changed files with 1 additions and 1 deletions

View File

@ -456,7 +456,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()