Skip to content

Commit

Permalink
KOTORBASE: Initialize LoadScreen::_progressBar
Browse files Browse the repository at this point in the history
This fixes Coverity Scan issue #1399011.
  • Loading branch information
DrMcCoy committed Feb 25, 2019
1 parent 2c620ae commit 0e2f827
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/engines/kotorbase/gui/loadscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ LoadScreen::LoadScreen(const Common::UString &UNUSED(name), Console *console) :
}

void LoadScreen::setLoadingProgress(unsigned int progress) {
_progressBar->setCurrentValue(progress);
if (_progressBar)
_progressBar->setCurrentValue(progress);
}

LoadingProgressFunc LoadScreen::getLoadingProgressFunc() {
Expand Down
2 changes: 1 addition & 1 deletion src/engines/kotorbase/gui/loadscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class LoadScreen : public GUI {
LoadingProgressFunc getLoadingProgressFunc();

protected:
Odyssey::WidgetProgressbar *_progressBar;
Odyssey::WidgetProgressbar *_progressBar { nullptr };
};

} // End of namespace KotORBase
Expand Down

0 comments on commit 0e2f827

Please sign in to comment.