Exiting Libretro scummvm on emuelec 4.1 error

I am experiencing an error when I try to exit scummvm games using the libretro scummvm emulator.

Instead of exiting to the emulationstation screen I get a red error screen which mentions a segmentation fault; exit 139.

I have tried this with other scummvm games and get the same issue.

Does anyone know why this might be happening?

Does the same happen with the standalone Scummvm? or just the libretro one?

It only happens with the libretro one.

The standalone one exits back to emulationstation.

I will test and try to find a solution to this, thanks for the report