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");
|
mp->_getProps()->removeChildren("set");
|
||||||
|
|
||||||
SGPropertyNode* set = NULL;
|
SGPropertyNode_ptr set;
|
||||||
|
|
||||||
if (simgear::strutils::ends_with(modelName, ".xml")
|
if (simgear::strutils::ends_with(modelName, ".xml")
|
||||||
&& simgear::strutils::starts_with(modelName, "Aircraft/")) {
|
&& simgear::strutils::starts_with(modelName, "Aircraft/")) {
|
||||||
|
@ -2444,8 +2444,7 @@ FGMultiplayMgr::addMultiplayer(const std::string& callsign,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete set;
|
set.reset();
|
||||||
set = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue