mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Add null pointer checks so Bahro no longer crash release clients
This commit is contained in:
@ -413,11 +413,16 @@ hsBool plAvBrainGeneric::IProcessFadeIn(double time, float elapsed)
|
|||||||
IEnterMoveMode(time); // if fadeIn's not zero, we have to wait until fade's done
|
IEnterMoveMode(time); // if fadeIn's not zero, we have to wait until fade's done
|
||||||
// before animating
|
// before animating
|
||||||
} else {
|
} else {
|
||||||
curStage->GetAnimInstance()->Fade(1.0f, fFadeIn);
|
plAGAnimInstance *curAnim = curStage->GetAnimInstance();
|
||||||
|
if(curAnim)
|
||||||
|
curAnim->Fade(1.0f, fFadeIn);
|
||||||
}
|
}
|
||||||
fMode = kFadingIn;
|
fMode = kFadingIn;
|
||||||
} else {
|
} else {
|
||||||
float curBlend = curStage->GetAnimInstance()->GetBlend();
|
plAGAnimInstance *curAnim = curStage->GetAnimInstance();
|
||||||
|
float curBlend = 1.0f;
|
||||||
|
if(curAnim)
|
||||||
|
curBlend = curAnim->GetBlend();
|
||||||
if(curBlend == 1.0f)
|
if(curBlend == 1.0f)
|
||||||
{
|
{
|
||||||
IEnterMoveMode(time);
|
IEnterMoveMode(time);
|
||||||
@ -440,7 +445,7 @@ hsBool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed)
|
|||||||
plAGAnimInstance *curAnim = curStage->GetAnimInstance();
|
plAGAnimInstance *curAnim = curStage->GetAnimInstance();
|
||||||
if(curAnim)
|
if(curAnim)
|
||||||
{
|
{
|
||||||
curStage->GetAnimInstance()->Fade(0.0f, fFadeOut);
|
curAnim->Fade(0.0f, fFadeOut);
|
||||||
IExitMoveMode();
|
IExitMoveMode();
|
||||||
fMode = kFadingOut;
|
fMode = kFadingOut;
|
||||||
} else {
|
} else {
|
||||||
@ -454,7 +459,10 @@ hsBool plAvBrainGeneric::IProcessFadeOut(double time, float elapsed)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// already fading; just keeping looking for the anim to zero out.
|
// already fading; just keeping looking for the anim to zero out.
|
||||||
float curBlend = curStage->GetAnimInstance()->GetBlend();
|
plAGAnimInstance *curAnim = curStage->GetAnimInstance();
|
||||||
|
float curBlend = 0.0f;
|
||||||
|
if(curAnim)
|
||||||
|
curBlend = curAnim->GetBlend();
|
||||||
if(curBlend == 0.0f)
|
if(curBlend == 0.0f)
|
||||||
{
|
{
|
||||||
curStage->Detach(fAvMod);
|
curStage->Detach(fAvMod);
|
||||||
|
Reference in New Issue
Block a user