fix npe in icon resource management