fix NPE

Signed-off-by: Hugo ThePooN Denizart <thepoon@cartooncraft.fr>