Load level with python resulting in crash

hi! i’m trying to load several selected levels in CB in a loop with python, and i’m experiencing constant crashes on loading the second item. The first level loads successfully, but the second attempt - crashes… Why does this happening?

import unreal

@unreal.uclass()
class MyEditorUtility(unreal.GlobalEditorUtilityBase):
		pass

editor_util = MyEditorUtility()
levels = editor_util.get_selected_assets()

for level in levels:
		unreal.EditorLevelLibrary.load_level(level.get_path_name())

		unreal.EditorLevelLibrary.save_all_dirty_levels()
		# unreal.EditorAssetLibrary.save_loaded_asset(level)

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks