diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2024-01-03 16:12:11 +0900 |
---|---|---|
committer | Jihoon Kim <jihoon48.kim@samsung.com> | 2024-01-03 16:12:11 +0900 |
commit | 1dbd86d7d4af7f50e7188a238188de7ea69d5bd4 (patch) | |
tree | 8d6b02a63afe0187767cd97a4bef6c342767b95d /test | |
parent | bb60713620f4f061bb5baa42a2f0ecf0655f1220 (diff) | |
download | libxkbcommon-1dbd86d7d4af7f50e7188a238188de7ea69d5bd4.tar.gz libxkbcommon-1dbd86d7d4af7f50e7188a238188de7ea69d5bd4.tar.bz2 libxkbcommon-1dbd86d7d4af7f50e7188a238188de7ea69d5bd4.zip |
Fix issue detected by static analysis tool
Change-Id: Iaebabbf2a7ee68693cf87c617ca698b8f54bf247
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/compose.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/compose.c b/test/compose.c index 8c633d7..4f3ae17 100644 --- a/test/compose.c +++ b/test/compose.c @@ -715,7 +715,8 @@ main(int argc, char *argv[]) #ifdef __linux__ const char *srcdir = getenv("top_srcdir"); clearenv(); - setenv("top_srcdir", srcdir, 1); + if (srcdir) + setenv("top_srcdir", srcdir, 1); #else unsetenv("XCOMPOSEFILE"); unsetenv("XDG_CONFIG_HOME"); |