Skip to content

Commit

Permalink
AURORA: Catch all exceptions in the NWScript Variable destructor
Browse files Browse the repository at this point in the history
This fixes Coverity Scan issue #1399032.
  • Loading branch information
DrMcCoy committed Feb 25, 2019
1 parent 7aec77b commit 769cb85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/aurora/nwscript/variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ Variable::Variable(const Variable &var) : _type(kTypeVoid) {
}

Variable::~Variable() {
setType(kTypeVoid);
try {
setType(kTypeVoid);
} catch (...) {
}
}

void Variable::setType(Type type) {
Expand Down

0 comments on commit 769cb85

Please sign in to comment.