Commit afba4440 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix crash in customize toolbar dialog.

For some reasons, this doesn't crash on Linux...
(cherry picked from commit 25d37a4930519c5bcabbe2c0fae8c86e38d9ea54)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b36ed57c
......@@ -647,16 +647,14 @@ inline int DroppingController::getParentPosInLayout( QPoint point )
QPoint origin = mapToGlobal ( point );
QWidget *tempWidg = QApplication::widgetAt( origin );
if( tempWidg == NULL )
return -1;
int i = -1;
if( tempWidg != NULL)
int i = controlLayout->indexOf( tempWidg );
if( i == -1 )
{
i = controlLayout->indexOf( tempWidg );
if( i == -1 )
{
i = controlLayout->indexOf( tempWidg->parentWidget() );
tempWidg = tempWidg->parentWidget();
}
i = controlLayout->indexOf( tempWidg->parentWidget() );
tempWidg = tempWidg->parentWidget();
}
/* Return the nearest position */
......
Markdown is supported
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