Avoid NPE when panel is not available