fix #3756: NPE when changing map source