Fix possible null pointer.

shapetextures
Clonkonaut 2015-12-30 03:21:53 +01:00
parent 1416887a22
commit ef48a60b27
1 changed files with 2 additions and 0 deletions

View File

@ -254,6 +254,8 @@ public func StopAim()
private func DoStopAim()
{
if (!aim_weapon)
ResetHands();
if(!aim_weapon->~FinishedAiming(this, aim_angle)) // return 1 means the weapon goes on doing something (e.g. start aiming) then we don't reset
ResetHands();
}