"Export to GLTF" crash issue

When calling the following function in a widget blueprint to export a level as GLTF at runtime, a crash occurs.

The crash happens both when running in the editor and in the built runtime executable.

However, exporting the level manually via Right-click on the level file → Asset Actions → Export works without any issues.

Am I calling the function incorrectly? How can I resolve this issue?

best regards.

gltfexporttest.zip (176.1 KB)