Fix potential crash in RotoContext