This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/change-remote-config
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 8f57ceb308a69db151b78d5103905c20e1f6ece7
Author: Tristan van Berkom <tris...@codethink.co.uk>
AuthorDate: Sun Jan 24 13:31:32 2021 +0900

    node.pyx: Fix segfault when calling MappingNode.get_str_list() with default 
None
---
 src/buildstream/node.pyx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/buildstream/node.pyx b/src/buildstream/node.pyx
index b16e8b3..7b46809 100644
--- a/src/buildstream/node.pyx
+++ b/src/buildstream/node.pyx
@@ -796,7 +796,9 @@ cdef class MappingNode(Node):
             :class:`list`: the value at `key` or the default
         """
         cdef SequenceNode sequence = self.get_sequence(key, default)
-        return sequence.as_str_list()
+        if sequence is not None:
+            return sequence.as_str_list()
+        return None
 
     cpdef object items(self):
         """Get a new view of the mapping items ((key, value) pairs).

Reply via email to