diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp index 6384fda896..d16d903f53 100644 --- a/src/widgets/kernel/qboxlayout.cpp +++ b/src/widgets/kernel/qboxlayout.cpp @@ -413,6 +413,7 @@ int QBoxLayoutPrivate::validateIndex(int index) const if (index < 0) return list.count(); // append + Q_ASSERT_X(index >= 0 && index <= list.count(), "QBoxLayout::insert", "index out of range"); return index; }