mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-26 14:58:51 -06:00
Add possibility to check if OsEng is instantiated
This commit is contained in:
@@ -49,6 +49,15 @@ OnScreenGUIModule::OnScreenGUIModule()
|
||||
{
|
||||
addPropertySubOwner(gui);
|
||||
|
||||
// TODO: Remove dependency on OsEng.
|
||||
// Instead, make this class implement an interface that OsEng depends on.
|
||||
// Do not try to register module callbacks if OsEng does not exist,
|
||||
// for example in the TaskRunner.
|
||||
|
||||
if (!OpenSpaceEngine::isCreated()) {
|
||||
return;
|
||||
}
|
||||
|
||||
OsEng.registerModuleCallback(
|
||||
OpenSpaceEngine::CallbackOption::Initialize,
|
||||
[](){
|
||||
|
||||
Reference in New Issue
Block a user