Skip to content

Commit

Permalink
Add check for valid constraint entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Python1320 authored Feb 10, 2019
1 parent b5260ea commit 5d516c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/autorun/server/advdupe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,7 @@ function AdvDupe.CreateConstraintFromTable( Player, Constraint, EntityList, Offs


local ok, Result = xpcall( Factory.Func, debug.traceback, unpack(Args) )
if ( !ok ) then
if ( !ok or !IsValid( Result ) ) then
MsgN("AdvDupeERROR: CreateConstraint failed to make \"",(Constraint.Type or "NIL"),"\", Error: ",tostring(Result))
AdvDupe.SendClientError( Player, "Failed to make \""..(Constraint.Type or "NIL").."\"" )
return
Expand Down

0 comments on commit 5d516c4

Please sign in to comment.