Skip to content

Commit

Permalink
KOTOR: Plug a leak by using ScopedPtr::reset() instead of release()
Browse files Browse the repository at this point in the history
Release is for transfering ownership of the pointer. The pointer is
not freed. reset() frees the pointer.
  • Loading branch information
DrMcCoy committed Jun 12, 2018
1 parent 5c78f6e commit 3efa87d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engines/kotor/gui/widgets/kotorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void KotORWidget::setFont(const Common::UString &fnt) {
void KotORWidget::setFill(const Common::UString &fill) {
if (fill.empty()) {
_quad->hide();
_quad.release();
_quad.reset();
return;
}

Expand All @@ -361,7 +361,7 @@ void KotORWidget::setFill(const Common::UString &fill) {
void KotORWidget::setHighlight(const Common::UString &hilight) {
if (hilight.empty()) {
_highlight->hide();
_highlight.release();
_highlight.reset();
return;
}

Expand Down

0 comments on commit 3efa87d

Please sign in to comment.