Skip to content

Commit 1626cf9

Browse files
committed
Fix segault when while predicate is missing
Originally reported by @MrTuxracer
1 parent e101c1b commit 1626cf9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/parser.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2236,6 +2236,9 @@ namespace Sass {
22362236
Supports_Block_Obj Parser::parse_supports_directive()
22372237
{
22382238
Supports_Condition_Obj cond = parse_supports_condition();
2239+
if (!cond) {
2240+
css_error("Invalid CSS", " after ", ": expected @supports condition (e.g. (display: flexbox)), was ", false);
2241+
}
22392242
// create the ast node object for the support queries
22402243
Supports_Block_Obj query = SASS_MEMORY_NEW(Supports_Block, pstate, cond);
22412244
// additional block is mandatory

0 commit comments

Comments
 (0)