aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-14 11:48:33 +0200
committerEugene Sandulenko2016-05-14 11:48:33 +0200
commit8156201f2822c97ace15dab5971fa9707c0e1da0 (patch)
tree19ecc3cc411f7f3fac7e9201718e17247bce4c9f
parente482fd8a1ab879a16a2a1781ccaa7521c02ca621 (diff)
downloadscummvm-rg350-8156201f2822c97ace15dab5971fa9707c0e1da0.tar.gz
scummvm-rg350-8156201f2822c97ace15dab5971fa9707c0e1da0.tar.bz2
scummvm-rg350-8156201f2822c97ace15dab5971fa9707c0e1da0.zip
WINTERMUTE: Remove redundant check.
If new() was unsuccessful, then we should bail out immediately, but we always assume we have enough memory for ScummVM.
-rw-r--r--engines/wintermute/ui/ui_window.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp
index 9f3cdeaaa3..34341d1db2 100644
--- a/engines/wintermute/ui/ui_window.cpp
+++ b/engines/wintermute/ui/ui_window.cpp
@@ -139,13 +139,12 @@ bool UIWindow::display(int offsetX, int offsetY) {
_shieldButton->setListener(this, _shieldButton, 0);
_shieldButton->_parent = this;
}
- if (_shieldButton) {
- _shieldButton->_posX = _shieldButton->_posY = 0;
- _shieldButton->setWidth(_gameRef->_renderer->getWidth());
- _shieldButton->setHeight(_gameRef->_renderer->getHeight());
- _shieldButton->display();
- }
+ _shieldButton->_posX = _shieldButton->_posY = 0;
+ _shieldButton->setWidth(_gameRef->_renderer->getWidth());
+ _shieldButton->setHeight(_gameRef->_renderer->getHeight());
+
+ _shieldButton->display();
}
if (!_visible) {