diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 904a6c5b65..92ebd6b045 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -486,7 +486,7 @@ bool setupEssentials(int& argc, char** argv) { // FIXME move to header, or better yet, design some kind of UI manager // to take care of highlighting keyboard focused items, rather than // continuing to overburden Application.cpp -Cube3DOverlay* _keyboardFocusHighlight{ nullptr }; +std::shared_ptr _keyboardFocusHighlight{ nullptr }; int _keyboardFocusHighlightID{ -1 }; @@ -3587,7 +3587,7 @@ void Application::setKeyboardFocusEntity(EntityItemID entityItemID) { _keyboardFocusedItem.set(entityItemID); _lastAcceptedKeyPress = usecTimestampNow(); if (_keyboardFocusHighlightID < 0 || !getOverlays().isAddedOverlay(_keyboardFocusHighlightID)) { - _keyboardFocusHighlight = new Cube3DOverlay(); + _keyboardFocusHighlight = std::make_shared(); _keyboardFocusHighlight->setAlpha(1.0f); _keyboardFocusHighlight->setBorderSize(1.0f); _keyboardFocusHighlight->setColor({ 0xFF, 0xEF, 0x00 });