We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6730fd0 commit 4fea33eCopy full SHA for 4fea33e
tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp
@@ -2441,7 +2441,8 @@ CameraBackgroundClearTest::CameraBackgroundClearTest()
2441
2442
void CameraBackgroundClearTest::switch_CameraClearMode(cocos2d::Ref* sender)
2443
{
2444
- auto type = _camera->getBackgroundBrush()->getBrushType();
+ auto brush = _camera->getBackgroundBrush();
2445
+ auto type = brush ? brush->getBrushType() : CameraBackgroundBrush::BrushType::NONE;
2446
if (type == CameraBackgroundBrush::BrushType::NONE)
2447
2448
_camera->setBackgroundBrush(CameraBackgroundBrush::createDepthBrush(1.f));
0 commit comments