summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-09-12 22:14:45 +0000
committerdarkvater <darkvater@openttd.org>2004-09-12 22:14:45 +0000
commit54bd5b3c1d8134d090a46deec712d0dec23034ee (patch)
tree4c5384ce51d19e7cdd78705fdbb78577832802c6
parentb2d55a936f1728953c521622e4769a96ff111183 (diff)
downloadopenttd-54bd5b3c1d8134d090a46deec712d0dec23034ee.tar.xz
(svn r227) -Fix: Sorry, broke console commands
-rw-r--r--console.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/console.c b/console.c
index 227120bb1..21bb8f6d6 100644
--- a/console.c
+++ b/console.c
@@ -704,9 +704,10 @@ bool IConsoleVarHookHandle(_iconsole_var * hook_var, byte type)
case ICONSOLE_HOOK_ACCESS:
proc = hook_var->hook_access;
break;
- default: return true;
}
+ if (proc == NULL) { return true;}
+
return proc(hook_var);
}
@@ -741,9 +742,10 @@ bool IConsoleCmdHookHandle(_iconsole_cmd * hook_cmd, byte type)
case ICONSOLE_HOOK_ACCESS:
proc = hook_cmd->hook_access;
break;
- default: return true;
}
+ if (proc == NULL) { return true;}
+
return proc(hook_cmd);
}