Allow null handles to be passed into acpi_name().

This commit is contained in:
Nate Lawson 2004-08-12 17:02:53 +00:00
parent 6d3e93598f
commit 0a9a1f44ce

View File

@ -2240,7 +2240,7 @@ acpi_name(ACPI_HANDLE handle)
buf.Length = sizeof(data);
buf.Pointer = data;
if (ACPI_SUCCESS(AcpiGetName(handle, ACPI_FULL_PATHNAME, &buf)))
if (handle && ACPI_SUCCESS(AcpiGetName(handle, ACPI_FULL_PATHNAME, &buf)))
return (data);
return ("(unknown)");
}