Skip to content

Commit

Permalink
Merge pull request #2336 from xzyfer/additional-hardening
Browse files Browse the repository at this point in the history
Additional hardening
  • Loading branch information
xzyfer authored Feb 18, 2017
2 parents be07f99 + 482b16a commit 4454eb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ namespace Sass {
template <typename T>
void Environment<T>::set_lexical(const std::string& key, T val)
{
auto cur = this; bool shadow = false;
while (cur->is_lexical() || shadow) {
auto cur = this;
bool shadow = false;
while ((cur && cur->is_lexical()) || shadow) {
if (cur->has_local(key)) {
cur->set_local(key, val);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/extend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ namespace Sass {
error("\"" + str_sel + "\" failed to @extend \"" + str_ext + "\".\n"
"The selector \"" + str_ext + "\" was not found.\n"
"Use \"@extend " + str_ext + " !optional\" if the"
" extend should be able to fail.", ext->pstate());
" extend should be able to fail.", (ext ? ext->pstate() : NULL));
}
}

Expand Down
1 change: 0 additions & 1 deletion src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,6 @@ namespace Sass {
bool right_ws = peek < css_comments >() != NULL;
operators.push_back({ op, left_ws, right_ws });
operands.push_back(parse_expression());
left_ws = peek < css_comments >() != NULL;
}
// we are called recursively for list, so we first
// fold inner binary expression which has delayed
Expand Down

0 comments on commit 4454eb6

Please sign in to comment.