From f6398315b1aedaf80b9e1f714df17807bb9370cd Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Fri, 9 Sep 2016 11:48:14 -0700 Subject: [PATCH] avoid a crash-on-exit --- interface/src/Application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 });