Skip to content

Commit 160f983

Browse files
committed
client: Protect CInterpolatedVarEntryBase operator= against self-assignment
1 parent a0cb0aa commit 160f983

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

game/client/interpolatedvar.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ struct CInterpolatedVarEntryBase
204204

205205
CInterpolatedVarEntryBase& operator=( const CInterpolatedVarEntryBase& src )
206206
{
207+
// dimhotepus: Protect against self-assignment.
208+
if (&src == this) return *this;
209+
207210
delete[] value;
208211
value = NULL;
209212
count = 0;

0 commit comments

Comments
 (0)