Use NULL instead of COND checks when appropriate
Restricted to scene
This commit is contained in:
@@ -1163,7 +1163,7 @@ void CPUParticles2D::_notification(int p_what) {
|
||||
|
||||
void CPUParticles2D::convert_from_particles(Node *p_particles) {
|
||||
GPUParticles2D *gpu_particles = Object::cast_to<GPUParticles2D>(p_particles);
|
||||
ERR_FAIL_COND_MSG(!gpu_particles, "Only GPUParticles2D nodes can be converted to CPUParticles2D.");
|
||||
ERR_FAIL_NULL_MSG(gpu_particles, "Only GPUParticles2D nodes can be converted to CPUParticles2D.");
|
||||
|
||||
set_emitting(gpu_particles->is_emitting());
|
||||
set_amount(gpu_particles->get_amount());
|
||||
|
||||
Reference in New Issue
Block a user