Commit 1066cf73 authored by Friedemann Kleint's avatar Friedemann Kleint Committed by hjk
Browse files

Debugger[gdb]: Fix crash when stepping over QLocale initialization.

Check the index before the array is accessed in the call item.

Task-number: QTCREATORBUG-5576
Change-Id: I3f533ef76af42dad97c93087f2d434b58fdedd44

Reviewed-by: default avatarQt Sanity Bot <>
Reviewed-by: default avatarOswald Buddenhagen <>
Reviewed-by: default avatarhjk <>
parent 81bb1c98
......@@ -556,8 +556,19 @@ def qdump__QLinkedList(d, item):
d.putSubItem(Item(p["t"], item.iname, i))
p = p["n"]
qqLocalesCount = None
def qdump__QLocale(d, item):
# Check for uninitialized 'index' variable. Retrieve size of QLocale data array
# from variable in qlocale.cpp (default: 368/Qt 4.8), 368 being 'System'.
global qqLocalesCount
if qqLocalesCount is None:
qqLocalesCount = int(value(qtNamespace() + 'locale_data_size'))
qqLocalesCount = 368
index = int(item.value["p"]["index"])
check(index >= 0 and index <= qqLocalesCount)
d.putStringValue(call(item.value, "name"))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment