aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-06-27 12:19:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-27 14:23:28 +0200
commitfa601425207383bf635b3623838c662e09b771f5 (patch)
tree9bc46f630e3451b34f0ce57332518d6455f7c743 /src/3rdparty
parent0a70ad14c41e9021855db70f85df36536a817a8c (diff)
Fix another failing assertion with MSVC's STL in debug mode
Try to avoid derefencing an empty vector, even when the result is not used. Change-Id: I8a8d8363f42dc3cea8ee702dc8555494b67a165d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/masm/yarr/YarrJIT.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/3rdparty/masm/yarr/YarrJIT.cpp b/src/3rdparty/masm/yarr/YarrJIT.cpp
index d36cd956de..fd05d81a31 100644
--- a/src/3rdparty/masm/yarr/YarrJIT.cpp
+++ b/src/3rdparty/masm/yarr/YarrJIT.cpp
@@ -212,7 +212,7 @@ class YarrGenerator : private MacroAssembler {
if (charClass->m_ranges.size()) {
unsigned matchIndex = 0;
JumpList failures;
- matchCharacterClassRange(character, failures, matchDest, &charClass->m_ranges[0], charClass->m_ranges.size(), &matchIndex, &charClass->m_matches[0], charClass->m_matches.size());
+ matchCharacterClassRange(character, failures, matchDest, &charClass->m_ranges[0], charClass->m_ranges.size(), &matchIndex, charClass->m_matches.isEmpty() ? 0 : &charClass->m_matches[0], charClass->m_matches.size());
while (matchIndex < charClass->m_matches.size())
matchDest.append(branch32(Equal, character, Imm32((unsigned short)charClass->m_matches[matchIndex++])));