fixed crash on plugin start

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