File tree Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -1225,7 +1225,7 @@ namespace Sass {
1225
1225
} else {
1226
1226
last ()->head_ ->concat (h);
1227
1227
}
1228
- } else {
1228
+ } else if ( last ()-> head_ ) {
1229
1229
last ()->head_ ->concat (h);
1230
1230
}
1231
1231
} else {
Original file line number Diff line number Diff line change @@ -218,7 +218,9 @@ namespace Sass {
218
218
Map_Obj argmap = Cast<Map>(a->value ());
219
219
220
220
for (auto key : argmap->keys ()) {
221
- std::string param = " $" + unquote (Cast<String_Constant>(key)->value ());
221
+ String_Constant_Ptr val = Cast<String_Constant>(key);
222
+ if (val == NULL ) throw Exception::InvalidVarKwdType (key->pstate (), key->inspect (), a);
223
+ std::string param = " $" + unquote (val->value ());
222
224
223
225
if (!param_map.count (param)) {
224
226
std::stringstream msg;
Original file line number Diff line number Diff line change @@ -718,7 +718,7 @@ namespace Sass {
718
718
}
719
719
720
720
Node chunk2 = Node::createCollection ();
721
- while (!chunker (seq2)) {
721
+ while (!seq2. collection ()-> empty () && ! chunker (seq2)) {
722
722
chunk2.collection ()->push_back (seq2.collection ()->front ());
723
723
seq2.collection ()->pop_front ();
724
724
}
@@ -1953,12 +1953,14 @@ namespace Sass {
1953
1953
Wrapped_Selector_Ptr ext_ws = Cast<Wrapped_Selector>(ext_head->first ());
1954
1954
if (ext_ws/* && ext_cs->length() == 1*/ ) {
1955
1955
Selector_List_Obj ws_cs = Cast<Selector_List>(ext_ws->selector ());
1956
- Compound_Selector_Obj ws_ss = ws_cs->first ()->head ();
1957
- if (!(
1958
- Cast<Pseudo_Selector>(ws_ss->first ()) ||
1959
- Cast<Element_Selector>(ws_ss->first ()) ||
1960
- Cast<Placeholder_Selector>(ws_ss->first ())
1961
- )) continue ;
1956
+ if (ws_cs && !ws_cs->empty () && ws_cs->first ()) {
1957
+ Compound_Selector_Obj ws_ss = ws_cs->first ()->head ();
1958
+ if (ws_ss && !ws_ss->empty () && !(
1959
+ Cast<Pseudo_Selector>(ws_ss->first ()) ||
1960
+ Cast<Element_Selector>(ws_ss->first ()) ||
1961
+ Cast<Placeholder_Selector>(ws_ss->first ())
1962
+ )) continue ;
1963
+ }
1962
1964
}
1963
1965
cpy_ws_sl->append (ext_cs->first ());
1964
1966
}
Original file line number Diff line number Diff line change @@ -1829,10 +1829,10 @@ namespace Sass {
1829
1829
Expand expand (ctx, &d_env, backtrace, &selector_stack);
1830
1830
Expression_Obj cond = ARG (" $condition" , Expression)->perform (&expand.eval );
1831
1831
bool is_true = !cond->is_false ();
1832
- Expression_Ptr res = ARG (is_true ? " $if-true" : " $if-false" , Expression);
1832
+ Expression_Obj res = ARG (is_true ? " $if-true" : " $if-false" , Expression);
1833
1833
res = res->perform (&expand.eval );
1834
1834
res->set_delayed (false ); // clone?
1835
- return res;
1835
+ return res. detach () ;
1836
1836
}
1837
1837
1838
1838
// ////////////////////////
You can’t perform that action at this time.
0 commit comments