Skip to content

Commit 051de01

Browse files
authored
Merge pull request #2570 from mgreter/bugfix/null-pointer-access-check-nesting
Fix null pointer access in nesting check
2 parents 09e41e6 + 00a833b commit 051de01

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/check_nesting.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ namespace Sass {
4242
At_Root_Block_Ptr ar = Cast<At_Root_Block>(parent);
4343
Block_Ptr ret = ar->block();
4444

45-
for (auto n : ret->elements()) {
46-
n->perform(this);
45+
if (ret != NULL) {
46+
for (auto n : ret->elements()) {
47+
n->perform(this);
48+
}
4749
}
4850

4951
this->parent = old_parent;

0 commit comments

Comments
 (0)