Skip to content

Commit 19b06a3

Browse files
committed
Return Null value for & if selector stack is empty
1 parent 77962e1 commit 19b06a3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/eval.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,10 +1517,14 @@ namespace Sass {
15171517
Expression* Eval::operator()(Parent_Selector* p)
15181518
{
15191519
Selector_List* pr = selector();
1520-
exp.selector_stack.pop_back();
1521-
if (pr) pr = operator()(pr);
1522-
exp.selector_stack.push_back(pr);
1523-
return pr;
1520+
if (pr) {
1521+
exp.selector_stack.pop_back();
1522+
pr = operator()(pr);
1523+
exp.selector_stack.push_back(pr);
1524+
return pr;
1525+
} else {
1526+
return new (ctx.mem) Null(p->pstate());
1527+
}
15241528
}
15251529

15261530
}

0 commit comments

Comments
 (0)