It is possible that particle handle is empty.
In this case, we should not call GetImplement()
Change-Id: I709708a231fe4856b026b8085ffd0e76300a0f27
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
try
{
Particle p = emitter->GetParticleList().NewParticle(lifetime);
- return int(p.GetIndex());
+ if(p)
+ {
+ return p.GetIndex();
+ }
}
CALL_CATCH_EXCEPTION(-1);
}
+ return -1;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_ParticleEmitter_GetParticleList(void* csThis)