Fix NULL after deref issue detected by static analysis tool
[platform/upstream/libxkbcommon.git] / src / xkbcomp / symbols.c
index 6d46884..58f73e6 100644 (file)
@@ -569,6 +569,9 @@ HandleIncludeSymbols(SymbolsInfo *info, IncludeStmt *include)
 {
     SymbolsInfo included;
 
+    if (!include)
+        return false;
+
     InitSymbolsInfo(&included, info->keymap, info->actions, &info->mods);
     included.name = include->stmt;
     include->stmt = NULL;