X86: Report an error if there's no kernel object, don't blindly use it.

This way the user gets a nice message instead of a less nice segfault.
This commit is contained in:
Gabe Black
2012-04-21 15:00:23 -07:00
parent 7aa57ac882
commit 29329e61b7

View File

@@ -114,6 +114,9 @@ X86System::initState()
{
System::initState();
if (!kernel)
fatal("No kernel to load.\n");
if (kernel->getArch() == ObjectFile::I386)
fatal("Loading a 32 bit x86 kernel is not supported.\n");