Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit afe0a54

Browse files
MortimerGorobluemarvin
authored andcommitted
Add missing Destroy() call in DeleteLayer() (#1707)
1 parent 357f7e1 commit afe0a54

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,8 +1620,14 @@ DeviceDelegateOculusVR::DeleteLayer(const VRLayerPtr& aLayer) {
16201620
m.cubeLayer = nullptr;
16211621
return;
16221622
}
1623+
if (m.equirectLayer && m.equirectLayer->layer == aLayer) {
1624+
m.equirectLayer->Destroy();
1625+
m.equirectLayer = nullptr;
1626+
return;
1627+
}
16231628
for (int i = 0; i < m.uiLayers.size(); ++i) {
16241629
if (m.uiLayers[i]->GetLayer() == aLayer) {
1630+
m.uiLayers[i]->Destroy();
16251631
m.uiLayers.erase(m.uiLayers.begin() + i);
16261632
return;
16271633
}

0 commit comments

Comments
 (0)