Skip to content

Commit

Permalink
Fix segfault on empty custom properties
Browse files Browse the repository at this point in the history
Originally reported in sass/sassc#225

Fixes sass/sassc#225
Spec sass/sass-spec#1249
  • Loading branch information
xzyfer committed Apr 16, 2018
1 parent 9266d26 commit 0bc35e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/expand.cpp
Expand Up @@ -246,7 +246,8 @@ namespace Sass {
std::string str(prop->to_string(ctx.c_options));
new_p = SASS_MEMORY_NEW(String_Constant, old_p->pstate(), str);
}
Expression_Obj value = d->value()->perform(&eval);
Expression_Obj value = d->value();
if (value) value = value->perform(&eval);
Block_Obj bb = ab ? operator()(ab) : NULL;
if (!bb) {
if (!value || (value->is_invisible() && !d->is_important())) return 0;
Expand Down

0 comments on commit 0bc35e3

Please sign in to comment.