Trying to prevent crashes like:
Assertion failed. condition:px != 0 /oe/dss-oe/poky-testing-nopkg-build/build/work/armv7ahf-neon-poky-linux-gnueabi/dss/git-r1/recipe-sysroot/usr/include/boost/smart_ptr/shared_ptr.hpp:734 typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = dss::State; typename boost::detail::sp_member_access<T>::type = dss::State*]
/usr/bin/dss(_ZN2ds12assertFailedEPKcS1_S1_S1_l+0x198)[0x6c7aa8]
/usr/bin/dss(_ZN5boost20assertion_failed_msgEPKcS1_S1_S1_l+0x0)[0x6c832c]
/usr/bin/dss(_ZNK3dss9Apartment20tryGetNonScriptStateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x148)[0x23b894]
/usr/bin/dss(_ZNK3dss9Apartment17getNonScriptStateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2c)[0x242378]
/usr/bin/dss(_ZN3dss11SceneAccess11checkAccessEPKNS_20AddressableModelItemENS_19SceneAccessCategoryE+0x4b0)[0x30f224]
/usr/bin/dss(_ZN3dss20AddressableModelItem9callSceneENS_10callOriginENS_19SceneAccessCategoryEiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x3c)[0x4c2538]
/usr/bin/dss(_ZN3dss15DeviceReference9callSceneENS_10callOriginENS_19SceneAccessCategoryEiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x98)[0x27c148]
/usr/bin/dss(_ZN3dss14dev_call_sceneEP9JSContextjPy+0x20c)[0x32b898]