Fix crash on some projects opening

BUG: 409477
parent f049619c
Pipeline #34697 failed with stage
in 17 minutes and 26 seconds