Fixed seg fault issue in main

Merged Lochlainn Connor requested to merge LochlainnCo-main-patch-39912 into main

Merge request reports