summaryrefslogtreecommitdiff
path: root/src/gpu/effects/flash_cube_effect.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-11 12:01:08 +0100
committerskal <pascal.massimino@gmail.com>2026-02-11 12:01:08 +0100
commit3159f625ece457fd0859939f61485090d5d99693 (patch)
tree8daba03cf27d81dc5f34a5165499153918f0c2a5 /src/gpu/effects/flash_cube_effect.h
parent5ceb0256792053ee80841f2b5ac0dfae1fd4c6f8 (diff)
fix: Use initialized_ flag instead of ctx_.device check
ctx_.device exists before init() but Renderer3D not initialized yet. Changed guard from !ctx_.device to !initialized_ flag. Set initialized_ = true after renderer_.init() in both effects. All 36 tests pass. Demo runs without crash. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/gpu/effects/flash_cube_effect.h')
-rw-r--r--src/gpu/effects/flash_cube_effect.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpu/effects/flash_cube_effect.h b/src/gpu/effects/flash_cube_effect.h
index 1c71164..df30b5b 100644
--- a/src/gpu/effects/flash_cube_effect.h
+++ b/src/gpu/effects/flash_cube_effect.h
@@ -24,4 +24,5 @@ class FlashCubeEffect : public Effect {
Camera camera_;
float last_beat_ = 0.0f;
float flash_intensity_ = 0.0f;
+ bool initialized_ = false;
};