From c513ec7824d0072f68f9b95957d6985cfe6b2eab Mon Sep 17 00:00:00 2001 From: "glassmancody.info" Date: Mon, 8 Aug 2022 12:53:20 -0700 Subject: [PATCH] null check --- components/sceneutil/lightmanager.cpp | 3 +++ 1 file changed, 3 insertions(+) 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);