Skip to content
Permalink
Browse files

Fix crash with empty attribute list

  • Loading branch information
manisandro authored and m-kuhn committed Apr 30, 2014
1 parent 19f226a commit a704b9fad08f1a27be8f4f36f7f64ca1be703f0c
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/qgsattributedialog.cpp
@@ -285,9 +285,9 @@ void QgsAttributeDialog::init()
// Set focus to first widget in list, to help entering data without moving the mouse.
if ( mypInnerLayout->rowCount() > 0 )
{
QWidget* widget = mypInnerLayout->itemAtPosition( 0, 1 )->widget();
if ( widget )
widget->setFocus( Qt::OtherFocusReason );
QLayoutItem* item = mypInnerLayout->itemAtPosition( 0, 1 );
if ( item && item->widget() )
item->widget()->setFocus( Qt::OtherFocusReason );
}

QSpacerItem *mypSpacer = new QSpacerItem( 0, 0, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding );

0 comments on commit a704b9f

Please sign in to comment.
You can’t perform that action at this time.