diff --git a/src/controls/QskControl.cpp b/src/controls/QskControl.cpp index 949e9e71..4608749b 100644 --- a/src/controls/QskControl.cpp +++ b/src/controls/QskControl.cpp @@ -543,6 +543,14 @@ QskControl::QskControl( QQuickItem* parent ) QskControl::~QskControl() { +#if defined( QT_DEBUG ) + if ( auto w = window() ) + { + // to catch suicide situations as a result of mouse clicks + Q_ASSERT( this != w->mouseGrabberItem() ); + } +#endif + if ( qskRegistry ) qskRegistry->remove( this );