diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-11 12:01:08 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-11 12:01:08 +0100 |
| commit | 3159f625ece457fd0859939f61485090d5d99693 (patch) | |
| tree | 8daba03cf27d81dc5f34a5165499153918f0c2a5 /src/gpu/effects/hybrid_3d_effect.h | |
| parent | 5ceb0256792053ee80841f2b5ac0dfae1fd4c6f8 (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/hybrid_3d_effect.h')
| -rw-r--r-- | src/gpu/effects/hybrid_3d_effect.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpu/effects/hybrid_3d_effect.h b/src/gpu/effects/hybrid_3d_effect.h index ea8285b..818b65c 100644 --- a/src/gpu/effects/hybrid_3d_effect.h +++ b/src/gpu/effects/hybrid_3d_effect.h @@ -25,4 +25,5 @@ class Hybrid3DEffect : public Effect { TextureManager texture_manager_; Scene scene_; Camera camera_; + bool initialized_ = false; }; |
