mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +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
|
// FIXME move to header, or better yet, design some kind of UI manager
|
||||||
// to take care of highlighting keyboard focused items, rather than
|
// to take care of highlighting keyboard focused items, rather than
|
||||||
// continuing to overburden Application.cpp
|
// continuing to overburden Application.cpp
|
||||||
Cube3DOverlay* _keyboardFocusHighlight{ nullptr };
|
std::shared_ptr<Cube3DOverlay> _keyboardFocusHighlight{ nullptr };
|
||||||
int _keyboardFocusHighlightID{ -1 };
|
int _keyboardFocusHighlightID{ -1 };
|
||||||
|
|
||||||
|
|
||||||
|
@ -3587,7 +3587,7 @@ void Application::setKeyboardFocusEntity(EntityItemID entityItemID) {
|
||||||
_keyboardFocusedItem.set(entityItemID);
|
_keyboardFocusedItem.set(entityItemID);
|
||||||
_lastAcceptedKeyPress = usecTimestampNow();
|
_lastAcceptedKeyPress = usecTimestampNow();
|
||||||
if (_keyboardFocusHighlightID < 0 || !getOverlays().isAddedOverlay(_keyboardFocusHighlightID)) {
|
if (_keyboardFocusHighlightID < 0 || !getOverlays().isAddedOverlay(_keyboardFocusHighlightID)) {
|
||||||
_keyboardFocusHighlight = new Cube3DOverlay();
|
_keyboardFocusHighlight = std::make_shared<Cube3DOverlay>();
|
||||||
_keyboardFocusHighlight->setAlpha(1.0f);
|
_keyboardFocusHighlight->setAlpha(1.0f);
|
||||||
_keyboardFocusHighlight->setBorderSize(1.0f);
|
_keyboardFocusHighlight->setBorderSize(1.0f);
|
||||||
_keyboardFocusHighlight->setColor({ 0xFF, 0xEF, 0x00 });
|
_keyboardFocusHighlight->setColor({ 0xFF, 0xEF, 0x00 });
|
||||||
|
|
Loading…
Reference in a new issue