Permalink
Browse files

Removed a potential nil pointer error.

  • Loading branch information...
1 parent 4ae83f3 commit cd89c9aa89b06f9382b375fec2fc7f3dbf1658ad @daranable committed Apr 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lua/starfall/libs_sv/chat.lua
@@ -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

0 comments on commit cd89c9a

Please sign in to comment.