Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Small fixes
 * Fix minor memory leak in attribute dialog
 * Safety check in dual view
  • Loading branch information
m-kuhn committed May 17, 2013
1 parent 5009aad commit 7b1d9e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -31,6 +31,7 @@

QgsDualView::QgsDualView( QWidget* parent )
: QStackedWidget( parent )
, mAttributeDialog( NULL )
, mProgressDlg( NULL )
{
setupUi( this );
Expand Down Expand Up @@ -258,7 +259,7 @@ void QgsDualView::setCurrentEditSelection( const QgsFeatureIds& fids )

void QgsDualView::saveEditChanges()
{
if ( mAttributeDialog->dialog() )
if ( mAttributeDialog && mAttributeDialog->dialog() )
{
if ( mLayerCache->layer()->isEditable() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsattributedialog.cpp
Expand Up @@ -179,7 +179,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
if ( !myWidget )
continue;

QLabel * mypLabel = new QLabel();
QLabel * mypLabel = new QLabel( mypInnerFrame );
mypInnerLayout->addWidget( mypLabel, index, 0 );
if ( myFieldType == QVariant::Int )
{
Expand Down

0 comments on commit 7b1d9e0

Please sign in to comment.