Fix #11426 (Right click cause crash when digitizing polygon inner ring)

Also fixed the same crash for add part and fill ring map tools.