launcher: Fix a crash that happens when TakeDevice has an error