History

fix AC crash with no controller scripting interface

Stephen Birarda committed 11 years ago

Commit ff21c221 parent edf024d1 file · +4 −1Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+4−1
@@ -317,7 +317,10 @@ void ScriptEngine::init() { · 316 unmodified lines
317317 registerAnimationTypes(this);
318318 registerAvatarTypes(this);
319319 registerAudioMetaTypes(this);
320− _controllerScriptingInterface->registerControllerTypes(this);
320+
321+ if (_controllerScriptingInterface) {
322+ _controllerScriptingInterface->registerControllerTypes(this);
323+ }
321324
322325 qScriptRegisterMetaType(this, EntityItemPropertiesToScriptValue, EntityItemPropertiesFromScriptValueHonorReadOnly);
323326 qScriptRegisterMetaType(this, EntityItemIDtoScriptValue, EntityItemIDfromScriptValue);