summaryrefslogtreecommitdiff
path: root/src/controls/qtexclusivegroup.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-03-13 11:54:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-13 16:18:30 +0100
commitdd2ad972ed11665c58694b5334de01454aa5c486 (patch)
tree11ff8bc83ede87320507724a5bcf8aac83eb4fc4 /src/controls/qtexclusivegroup.cpp
parent9f47b7cbd9b20949ba35bc9c06d14fed46e83ca5 (diff)
downloadqtquickcontrols-dd2ad972ed11665c58694b5334de01454aa5c486.tar.gz
Fix crash in exclusive group
When the current item gets removed we need to properly clean up. Change-Id: I2a844319bbf8513b6ed5e40eccb15b6d03b73df9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/controls/qtexclusivegroup.cpp')
-rw-r--r--src/controls/qtexclusivegroup.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/controls/qtexclusivegroup.cpp b/src/controls/qtexclusivegroup.cpp
index 576a2cbc..e8c3d54f 100644
--- a/src/controls/qtexclusivegroup.cpp
+++ b/src/controls/qtexclusivegroup.cpp
@@ -171,6 +171,8 @@ void QtExclusiveGroup::bindCheckable(QObject *o)
void QtExclusiveGroup::unbindCheckable(QObject *o)
{
+ if (m_current == o)
+ setCurrent(0);
for (const char **signalName = checkableSignals; *signalName; signalName++) {
int signalIndex = o->metaObject()->indexOfSignal(*signalName);
if (signalIndex != -1) {