diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index 5e9f187498..e24cdcf6f3 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -608,6 +608,9 @@ namespace SceneUtil public: LightManagerCullCallback(LightManager* lightManager) { + if (!lightManager->getUBOManager()) + return; + for (size_t i = 0; i < mStateSet.size(); ++i) { auto& buffer = lightManager->getUBOManager()->getLightBuffer(i);