Fixed crasch when deleting image in test scene.

Signed-off-by: Strakas <reetopps6@hotmail.com>