Skip to content

Commit

Permalink
Removed a potential nil pointer error.
Browse files Browse the repository at this point in the history
  • Loading branch information
daranable committed Apr 18, 2012
1 parent 4ae83f3 commit cd89c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/starfall/libs_sv/chat.lua
Expand Up @@ -76,11 +76,11 @@ function chat.listen( func, ply )
if type(ply) ~= "Player" and nil ~= ply then
error("Invalid player entity passed to chat.listen", 2)
end
local steamid = ply:SteamID()

if not ply then
callbacks[instance]["global"][func] = func
else
local steamid = ply:SteamID()
if not callbacks[instance][steamid] then
callbacks[instance][steamid] = {}
end
Expand Down

0 comments on commit cd89c9a

Please sign in to comment.