Use NULL instead of COND checks when appropriate

Restricted to scene
This commit is contained in:
Ninni Pipping
2023-06-06 14:59:54 +02:00
parent 9723077f4f
commit dcd2b883eb
43 changed files with 123 additions and 126 deletions

View File

@@ -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());