aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/ui
diff options
context:
space:
mode:
authorPeter Kohaut2019-02-20 22:02:43 +0100
committerPeter Kohaut2019-02-20 23:02:05 +0100
commit4886b0581ee45f5360b96bccf061cec982ede9f3 (patch)
tree4c9247d8bcfa4deb3be6717f4c821705408a611d /engines/bladerunner/ui
parentdaa98e408fa9f799b12b60f1331f5bd043ec3240 (diff)
downloadscummvm-rg350-4886b0581ee45f5360b96bccf061cec982ede9f3.tar.gz
scummvm-rg350-4886b0581ee45f5360b96bccf061cec982ede9f3.tar.bz2
scummvm-rg350-4886b0581ee45f5360b96bccf061cec982ede9f3.zip
BLADERUNNER: Fix Coverity issues
Diffstat (limited to 'engines/bladerunner/ui')
-rw-r--r--engines/bladerunner/ui/kia_section_load.cpp8
-rw-r--r--engines/bladerunner/ui/kia_section_save.cpp7
2 files changed, 15 insertions, 0 deletions
diff --git a/engines/bladerunner/ui/kia_section_load.cpp b/engines/bladerunner/ui/kia_section_load.cpp
index a512188b43..4d91fb51b0 100644
--- a/engines/bladerunner/ui/kia_section_load.cpp
+++ b/engines/bladerunner/ui/kia_section_load.cpp
@@ -42,6 +42,14 @@ KIASectionLoad::KIASectionLoad(BladeRunnerEngine *vm) : KIASectionBase(vm) {
_uiContainer = new UIContainer(_vm);
_scrollBox = new UIScrollBox(_vm, scrollBoxCallback, this, 1025, 0, true, Common::Rect(155, 158, 461, 346), Common::Rect(506, 160, 506, 350));
_uiContainer->add(_scrollBox);
+
+ _timeLast = 0;
+ _timeLeft = 0;
+
+ _hoveredLineId = -1;
+ _newGameEasyLineId = -1;
+ _newGameMediumLineId = -1;
+ _newGameHardLineId = -1;
}
KIASectionLoad::~KIASectionLoad() {
diff --git a/engines/bladerunner/ui/kia_section_save.cpp b/engines/bladerunner/ui/kia_section_save.cpp
index 07873e39b7..46ee0384d2 100644
--- a/engines/bladerunner/ui/kia_section_save.cpp
+++ b/engines/bladerunner/ui/kia_section_save.cpp
@@ -54,6 +54,11 @@ KIASectionSave::KIASectionSave(BladeRunnerEngine *vm) : KIASectionBase(vm) {
_buttons = new UIImagePicker(_vm, 3);
+ _timeLast = 0;
+ _timeLeft = 0;
+
+ _state = kStateNormal;
+
_mouseX = 0;
_mouseY = 0;
@@ -384,6 +389,8 @@ void KIASectionSave::save() {
Common::OutSaveFile *saveFile = BladeRunner::SaveFileManager::openForSaving(_vm->getTargetName(), slot);
if (saveFile == nullptr || saveFile->err()) {
delete saveFile;
+ error("Can not open savegame file for writing");
+ return;
}
BladeRunner::SaveFileHeader header;