How to stop all versions of unreal engine crashing

Hey guys,

I am having a bit of a problem with unreal engine after not using it for some time. After opening the editor for about 10 seconds it just crashes. Sometimes i get this message
Fatal error: [File:D:\Build++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp] [Line: 798]
Rendering thread exception:
Fatal error: [File:D:\Build++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11Util.cpp] [Line: 182]
Unreal Engine is exiting due to D3D device being lost. (Error: 0x887A0020 - ‘INTERNAL_ERROR’)

But sometimes i dont get anything.

My laptop specs are
8GB DDR3 Memory
AMD Radeon R5 M340 Graphics 2GB
Intel Core I5
1TB HDD

Really hope someone can help me fix this!