Platform detection: Fix segfault when platform is not found.
The search loop didn't had a working break condition, so the programm contined with garbage. Fixed this and added an error message if no matching platform is found.
The search loop didn't had a working break condition, so the programm contined with garbage. Fixed this and added an error message if no matching platform is found.