[FIXED] cPlayer with NULL pointer to cClientHandle
#1
Apparently sometimes a player still has a NULL pointer to its cClientHandle.

I noticed this in cFurnaceEntity::Tick line 187
It tries to send a cooking progress packet to a NULL pointer

This is just a reminder for me, I'll have to investigate later
Reply
Thanks given by:
#2
cClientHandle's destructor sets cPlayer's m_ClientHandle to NULL just before detaching itself from the player object. This might be the cause.

I'd say, remove the cPlayer::SetClientHandle altogether and set the cPlayer's clienthandle to NULL in its Destroy() method. Then you'll see if there have been any more calls to SetClientHandle().
And of course you can put asserts everywhere Smile
Reply
Thanks given by:
#3
These are all references to SetClientHandle, so really it's only called once from the cClientHandle destructor
[Image: Screenshot-2012-03-07_13.03.59.png]

You're right about removing it, it's called together with Destroy() anyway
Reply
Thanks given by:
#4
Well, I've seen VS's "Call browser" fail too many a time, so I don't trust it anymore Wink Removing the function implementation is the easiest way to tell Smile
Reply
Thanks given by:
#5
It's Visual Assist's reference finder thingy Wink Much better.
Reply
Thanks given by:




Users browsing this thread: 5 Guest(s)