diff options
Diffstat (limited to 'editor/plugins/particles_2d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/particles_2d_editor_plugin.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp index a759e5892f..076e27c741 100644 --- a/editor/plugins/particles_2d_editor_plugin.cpp +++ b/editor/plugins/particles_2d_editor_plugin.cpp @@ -33,13 +33,10 @@ #include "io/image_loader.h" #include "scene/3d/particles.h" #include "scene/gui/separator.h" + void Particles2DEditorPlugin::edit(Object *p_object) { - if (p_object) { - particles = p_object->cast_to<Particles2D>(); - } else { - particles = NULL; - } + particles = Object::cast_to<Particles2D>(p_object); } bool Particles2DEditorPlugin::handles(Object *p_object) const { |