aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib
diff options
context:
space:
mode:
Diffstat (limited to 'lexlib')
-rw-r--r--lexlib/SparseState.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lexlib/SparseState.h b/lexlib/SparseState.h
index 655d7429c..08ff104d3 100644
--- a/lexlib/SparseState.h
+++ b/lexlib/SparseState.h
@@ -92,7 +92,7 @@ public:
changed = true;
}
typename stateVector::const_iterator startOther = other.states.begin();
- if (!states.empty() && states.back().value == startOther->value)
+ if (!states.empty() && !other.states.empty() && states.back().value == startOther->value)
++startOther;
if (startOther != other.states.end()) {
states.insert(states.end(), startOther, other.states.end());