Check if the paren stack has elements first.

This commit is contained in:
Vassil Vassilev 2014-10-06 19:05:09 +02:00 committed by sftnight
parent 32d06e92f0
commit a83d3bafe3

View File

@ -55,7 +55,7 @@ namespace cling {
// If there is " or ' we don't need to look for balancing until we
// enounter matching " or '
Res = kIncomplete;
if (m_ParenStack.back() == kind) {
if (m_ParenStack.size() && m_ParenStack.back() == kind) {
// We know that the top of the stack will have the leading quote or
// apostophe because nobody is pushing onto it until we find a balance
m_ParenStack.pop_back();