summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/acpi/acpigen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c
index 244ac548c9..9a5543d5a4 100644
--- a/src/acpi/acpigen.c
+++ b/src/acpi/acpigen.c
@@ -291,6 +291,10 @@ void acpigen_emit_namestring(const char *namepath)
int dotcount = 0, i;
int dotpos = 0;
+ /* Check for NULL pointer */
+ if (!namepath)
+ return;
+
/* We can start with a '\'. */
if (namepath[0] == '\\') {
acpigen_emit_byte('\\');