Skip to content

Commit 0bc35e3

Browse files
committed
Fix segfault on empty custom properties
Originally reported in sass/sassc#225 Fixes sass/sassc#225 Spec sass/sass-spec#1249
1 parent 9266d26 commit 0bc35e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/expand.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ namespace Sass {
246246
std::string str(prop->to_string(ctx.c_options));
247247
new_p = SASS_MEMORY_NEW(String_Constant, old_p->pstate(), str);
248248
}
249-
Expression_Obj value = d->value()->perform(&eval);
249+
Expression_Obj value = d->value();
250+
if (value) value = value->perform(&eval);
250251
Block_Obj bb = ab ? operator()(ab) : NULL;
251252
if (!bb) {
252253
if (!value || (value->is_invisible() && !d->is_important())) return 0;

0 commit comments

Comments
 (0)