Fixed crash uncovered by the ab1fad052cd771e183f496f5db922fa03a13edea update

Special Thanks to Haruna

Signed-off-by: shennetsind <ind@henn.et>