1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

Avoid dereference after null check

This commit is contained in:
Andrei Kortunov 2018-08-01 19:30:30 +04:00
parent 1c13256456
commit a08048da4e
3 changed files with 5 additions and 4 deletions

View file

@ -82,7 +82,7 @@ namespace MWGui
dialog->eventOkClicked.clear(); dialog->eventOkClicked.clear();
dialog->eventOkClicked += MyGUI::newDelegate(this, &ContainerWindow::dragItem); dialog->eventOkClicked += MyGUI::newDelegate(this, &ContainerWindow::dragItem);
} }
else else if (mModel)
dragItem (NULL, count); dragItem (NULL, count);
} }

View file

@ -898,7 +898,8 @@ namespace MWGui
mKeyboardNavigation->onFrame(); mKeyboardNavigation->onFrame();
mMessageBoxManager->onFrame(frameDuration); if (mMessageBoxManager)
mMessageBoxManager->onFrame(frameDuration);
mToolTips->onFrame(frameDuration); mToolTips->onFrame(frameDuration);

View file

@ -1180,9 +1180,9 @@ namespace MWWorld
addContainerScripts (getPlayerPtr(), newCell); addContainerScripts (getPlayerPtr(), newCell);
newPtr = getPlayerPtr(); newPtr = getPlayerPtr();
} }
else else if (currCell)
{ {
bool currCellActive = currCell && mWorldScene->isCellActive(*currCell); bool currCellActive = mWorldScene->isCellActive(*currCell);
bool newCellActive = newCell && mWorldScene->isCellActive(*newCell); bool newCellActive = newCell && mWorldScene->isCellActive(*newCell);
if (!currCellActive && newCellActive) if (!currCellActive && newCellActive)
{ {