Fix NULL after deref issue detected by static analysis tool
[platform/upstream/libxkbcommon.git] / src / xkbcomp / compat.c
index 9b6f9de..44a444c 100644 (file)
@@ -430,6 +430,9 @@ HandleIncludeCompatMap(CompatInfo *info, IncludeStmt *include)
 {
     CompatInfo included;
 
+    if (!include)
+        return false;
+
     InitCompatInfo(&included, info->ctx, info->actions, &info->mods);
     included.name = include->stmt;
     include->stmt = NULL;