fix crash in rop issue #1711

issue #1711 
according to @zonkzonk this fixes the crash.

I could not repro, but it looks fine to me.