Skip to content

Commit 7b1d9e0

Browse files
committed
Small fixes
* Fix minor memory leak in attribute dialog * Safety check in dual view
1 parent 5009aad commit 7b1d9e0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/gui/attributetable/qgsdualview.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
QgsDualView::QgsDualView( QWidget* parent )
3333
: QStackedWidget( parent )
34+
, mAttributeDialog( NULL )
3435
, mProgressDlg( NULL )
3536
{
3637
setupUi( this );
@@ -258,7 +259,7 @@ void QgsDualView::setCurrentEditSelection( const QgsFeatureIds& fids )
258259

259260
void QgsDualView::saveEditChanges()
260261
{
261-
if ( mAttributeDialog->dialog() )
262+
if ( mAttributeDialog && mAttributeDialog->dialog() )
262263
{
263264
if ( mLayerCache->layer()->isEditable() )
264265
{

src/gui/qgsattributedialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
179179
if ( !myWidget )
180180
continue;
181181

182-
QLabel * mypLabel = new QLabel();
182+
QLabel * mypLabel = new QLabel( mypInnerFrame );
183183
mypInnerLayout->addWidget( mypLabel, index, 0 );
184184
if ( myFieldType == QVariant::Int )
185185
{

0 commit comments

Comments
 (0)