mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
avoid a crash-on-exit
This commit is contained in:
parent
e5b56fec7c
commit
f6398315b1
1 changed files with 2 additions and 2 deletions
|
@ -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<Cube3DOverlay> _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<Cube3DOverlay>();
|
||||
_keyboardFocusHighlight->setAlpha(1.0f);
|
||||
_keyboardFocusHighlight->setBorderSize(1.0f);
|
||||
_keyboardFocusHighlight->setColor({ 0xFF, 0xEF, 0x00 });
|
||||
|
|
Loading…
Reference in a new issue