NXP-12375: avoid NPE on shutdown