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

Qt: fix crash in customize toolbar dialog.



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