From 73a99df89420b7bf2939bdd0ddf53ad755ce8a3e Mon Sep 17 00:00:00 2001 From: Night Owl Date: Mon, 17 Jul 2017 10:15:17 +0500 Subject: [PATCH] Merge https://github.com/LevShisterov/BugfixedHL/commit/c66ee97ade72db0f63d1357d7a0760702a1c92e8 --- dlls/cbase.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/cbase.cpp b/dlls/cbase.cpp index cdf9a00f..6009bfd5 100644 --- a/dlls/cbase.cpp +++ b/dlls/cbase.cpp @@ -441,9 +441,16 @@ edict_t *EHANDLE::Get( void ) edict_t *EHANDLE::Set( edict_t *pent ) { - m_pent = pent; - if( pent ) - m_serialnumber = m_pent->serialnumber; + if( pent ) + { + m_pent = pent; + m_serialnumber = m_pent->serialnumber; + } + else + { + m_pent = NULL; + m_serialnumber = 0; + } return pent; }