Merge "Fix a potential NPE" into sc-v2-dev