1
0
Fork 0

InfoReg: Don't fail if there are no commands to register.

This commit is contained in:
Mattes D 2016-09-22 12:54:13 +02:00
parent 95b9a00eb5
commit af4e88030b
1 changed files with 6 additions and 2 deletions

View File

@ -159,7 +159,9 @@ function RegisterPluginInfoCommands()
end
-- Loop through all commands in the plugin info, register each:
RegisterSubcommands("", g_PluginInfo.Commands, 1)
if (g_PluginInfo.Commands) then
RegisterSubcommands("", g_PluginInfo.Commands, 1)
end
end
@ -190,7 +192,9 @@ function RegisterPluginInfoConsoleCommands()
end
-- Loop through all commands in the plugin info, register each:
RegisterSubcommands("", g_PluginInfo.ConsoleCommands, 1)
if (g_PluginInfo.ConsoleCommands) then
RegisterSubcommands("", g_PluginInfo.ConsoleCommands, 1)
end
end