1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

client/NetPacksClient.cpp: Combine null pointer checks

Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
This commit is contained in:
Alexander Wilms 2023-10-28 00:21:16 +02:00
parent 92bab6dd08
commit bb04ca46b5

View File

@ -377,13 +377,10 @@ void ApplyFirstClientNetPackVisitor::visitChangeObjPos(ChangeObjPos & pack)
void ApplyClientNetPackVisitor::visitChangeObjPos(ChangeObjPos & pack)
{
CGObjectInstance *obj = gs.getObjInstance(pack.objid);
if(CGI)
if(CGI && CGI->mh)
{
if(CGI->mh)
{
CGI->mh->onObjectFadeIn(obj, pack.initiator);
CGI->mh->waitForOngoingAnimations();
}
CGI->mh->onObjectFadeIn(obj, pack.initiator);
CGI->mh->waitForOngoingAnimations();
}
cl.invalidatePaths();
}