summaryrefslogtreecommitdiff
path: root/src/effects/particles_effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/particles_effect.cc')
-rw-r--r--src/effects/particles_effect.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/effects/particles_effect.cc b/src/effects/particles_effect.cc
index 709acbf..a98d7e5 100644
--- a/src/effects/particles_effect.cc
+++ b/src/effects/particles_effect.cc
@@ -1,6 +1,7 @@
// This file is part of the 64k demo project.
// It implements the ParticlesEffect.
+#include "util/fatal_error.h"
#include "effects/particles_effect.h"
#include "gpu/gpu.h"
#include "gpu/shaders.h"
@@ -10,10 +11,8 @@ ParticlesEffect::ParticlesEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs)
: Effect(ctx, inputs, outputs) {
- // Headless mode: skip GPU resource creation
- if (ctx_.device == nullptr) {
- return;
- }
+ // Headless mode: skip GPU resource creation (compiled out in STRIP_ALL)
+ HEADLESS_RETURN_IF_NULL(ctx_.device);
// Initialize uniforms
uniforms_.init(ctx_.device);