ide: Fix segfault when flushing a device that doesn't exist