From 05ce2fb0c873f8c5c45031bb71251dc553dcb9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:15:21 +0200 Subject: [PATCH] Fix crash in `Particles3DEmissionShapeGizmoPlugin`. --- .../gizmos/particles_3d_emission_shape_gizmo_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp b/editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp index b258b93d44..65861b89ca 100644 --- a/editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp @@ -85,8 +85,8 @@ void Particles3DEmissionShapeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { if (Object::cast_to(p_gizmo->get_node_3d())) { const GPUParticles3D *particles = Object::cast_to(p_gizmo->get_node_3d()); - if (particles->get_process_material().is_valid()) { - const Ref mat = particles->get_process_material(); + const Ref mat = particles->get_process_material(); + if (mat.is_valid()) { const ParticleProcessMaterial::EmissionShape shape = mat->get_emission_shape(); const Ref material = get_material("particles_emission_shape_material", p_gizmo);