[gnome-builder] makecache: check for proper pointer before calling g_strstrip()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] makecache: check for proper pointer before calling g_strstrip()
- Date: Sat, 25 Feb 2017 04:29:59 +0000 (UTC)
commit 87ab8f6489a970538a67bbccf764f7a5b8dcaf2c
Author: Christian Hergert <chergert redhat com>
Date: Fri Feb 24 20:29:49 2017 -0800
makecache: check for proper pointer before calling g_strstrip()
The functions that g_strstrip() calls do not take NULL, so we need to check
for a proper pointer first.
plugins/autotools/ide-makecache.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/autotools/ide-makecache.c b/plugins/autotools/ide-makecache.c
index 56c7df0..fec6782 100644
--- a/plugins/autotools/ide-makecache.c
+++ b/plugins/autotools/ide-makecache.c
@@ -1657,7 +1657,8 @@ ide_makecache_get_build_targets_worker (GTask *task,
parts = g_strsplit (line, "=", 2);
g_strstrip (parts [0]);
- g_strstrip (parts [1]);
+ if (parts[1])
+ g_strstrip (parts [1]);
if (ide_str_empty0 (parts[0]) || ide_str_empty0 (parts[1]))
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]