Fix crash when nodeptr is null and node->get_source() is called

Responsible for the crash during the low-level tests after
9c63ad3209e8d9eb5dec5e498725491ead037765.
This commit is contained in:
Mahmoud Al-Qudsi 2018-09-26 20:35:39 -05:00
parent a0110d296c
commit 1f440eb063

View File

@ -107,6 +107,9 @@ class tnode_t {
}
wcstring get_source(const wcstring &str) const {
if (!nodeptr) {
return L"";
}
return nodeptr->get_source(str);
}