Skip to content

Conversation

@Wall-core
Copy link
Contributor

Fixes a dereferenced unit pointer crash

Fixes a dereferenced null pointer
@ratkosrb
Copy link
Contributor

Did you actually get a crash here? Cause if IsCreature is true then pUnit can't be null, because all creatures are units, it's their base class.

@Wall-core
Copy link
Contributor Author

frankly I'm not sure, I'm helping debug AshenWoW and don't have a stack trace but there's a crash occurring somewhere in findRandomPointAroundCircle, according to the crashlog:

image

so I just browsed through these associated functions and my visual studio was throwing a warning for dereferenced null pointer, which I dealt with here.

I'll be helping them rebuild with gdb this week so I can get an actual stack trace, but if you want to investigate further, here is an additional crashlog (same problem):

image

@ratkosrb
Copy link
Contributor

Oh I know what causes this. You need to set CleanupTerrain to 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants