[Core] Avoid crash when ProcessWrapper is disposed