fix crash

fix crash at line 368 as &varyingsPtr[0] crashes when the vector is empty