From 1f440eb063f097415b0e951e191d7774017d3c04 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Wed, 26 Sep 2018 20:35:39 -0500 Subject: [PATCH] Fix crash when nodeptr is null and node->get_source() is called Responsible for the crash during the low-level tests after 9c63ad3209e8d9eb5dec5e498725491ead037765. --- src/tnode.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tnode.h b/src/tnode.h index 60fac38b6..cf52d66e0 100644 --- a/src/tnode.h +++ b/src/tnode.h @@ -107,6 +107,9 @@ class tnode_t { } wcstring get_source(const wcstring &str) const { + if (!nodeptr) { + return L""; + } return nodeptr->get_source(str); }