fix #28006
Merge pull request #1050 from BartlomiejLewandowski/28006-repeat-crash

fix #28006