Gui: [skip ci] Fix coverity warning

Coverity warnings fixed:

CID 316550 (#1 of 1): Uninitialized scalar variable (UNINIT)
13. uninit_use_in_call: Using uninitialized value sel. Field sel.pResolvedObject is uninitialized when calling push_back
This commit is contained in:
wmayer
2021-02-21 16:00:01 +01:00
parent 91c36f9ab1
commit abfbed3ffa

View File

@@ -551,7 +551,9 @@ bool SoFCUnifiedSelection::setSelection(const std::vector<PickedInfo> &infos, bo
if(infos.size()>1) { if(infos.size()>1) {
for(auto &info : infos) { for(auto &info : infos) {
if(!info.vpd) continue; if(!info.vpd) continue;
SelectionSingleton::SelObj sel; SelectionSingleton::SelObj sel;
sel.pResolvedObject = nullptr;
sel.pObject = info.vpd->getObject(); sel.pObject = info.vpd->getObject();
sel.pDoc = sel.pObject->getDocument(); sel.pDoc = sel.pObject->getDocument();
sel.DocName = sel.pDoc->getName(); sel.DocName = sel.pDoc->getName();