From e3512120403dc7863a38bf2f122e7523593718ad Mon Sep 17 00:00:00 2001 From: xzyfer Date: Mon, 16 Apr 2018 19:45:03 +1000 Subject: [PATCH] Fix segfault on empty custom properties Originally reported in sass/sassc#225 Fixes sass/sassc#225 Spec sass/sass-spec#1249 --- src/expand.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/expand.cpp b/src/expand.cpp index ccd2822df..d8dc03f14 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -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;