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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user