Fix crasher where mMainPart was NULL