This can happen elsewhere by the looks (not in current mainline, as I think the constructor that allows NULL is not in use).

Should probably also check that setting is a list type as well prior to casting to CSettingList.