src/MultiPlayer/multiplaymgr.cxx: use SGPropertyNode_ptr to avoid explicit delete.
As suggested by James Turner
This commit is contained in:
parent
2dcf9c30bb
commit
904e55d657
1 changed files with 2 additions and 3 deletions
|
@ -2381,7 +2381,7 @@ FGMultiplayMgr::addMultiplayer(const std::string& callsign,
|
|||
*/
|
||||
mp->_getProps()->removeChildren("set");
|
||||
|
||||
SGPropertyNode* set = NULL;
|
||||
SGPropertyNode_ptr set;
|
||||
|
||||
if (simgear::strutils::ends_with(modelName, ".xml")
|
||||
&& simgear::strutils::starts_with(modelName, "Aircraft/")) {
|
||||
|
@ -2444,8 +2444,7 @@ FGMultiplayMgr::addMultiplayer(const std::string& callsign,
|
|||
break;
|
||||
}
|
||||
}
|
||||
delete set;
|
||||
set = NULL;
|
||||
set.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue