mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +02:00
adding a null check to the display plugin. Possible that display plugin was disposed off during the check if hmdmode
This commit is contained in:
parent
f235778a6e
commit
73097113c7
1 changed files with 8 additions and 1 deletions
|
@ -47,5 +47,12 @@ void AbstractHMDScriptingInterface::setIPDScale(float IPDScale) {
|
|||
}
|
||||
|
||||
bool AbstractHMDScriptingInterface::isHMDMode() const {
|
||||
return PluginContainer::getInstance().getActiveDisplayPlugin()->isHmd();
|
||||
|
||||
auto displayPlugin = PluginContainer::getInstance().getActiveDisplayPlugin();
|
||||
|
||||
if (displayPlugin) {
|
||||
return displayPlugin->isHmd();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue