Skip to content

Commit 8c85b73

Browse files
committedSep 30, 2018
Fix rubbish context leads to crash
1 parent bdbd294 commit 8c85b73

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
 

‎src/analysis/vector/geometry_checker/qgsgeometrychecker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929

3030

3131

32-
QgsGeometryChecker::QgsGeometryChecker( const QList<QgsGeometryCheck *> &checks, const QMap<QString, QgsFeaturePool *> &featurePools )
32+
QgsGeometryChecker::QgsGeometryChecker( const QList<QgsGeometryCheck *> &checks, QgsGeometryCheckContext *context, const QMap<QString, QgsFeaturePool *> &featurePools )
3333
: mChecks( checks )
34+
, mContext( context )
3435
, mFeaturePools( featurePools )
3536
{
3637
for ( auto it = featurePools.constBegin(); it != mFeaturePools.constEnd(); ++it )

‎src/analysis/vector/geometry_checker/qgsgeometrychecker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ANALYSIS_EXPORT QgsGeometryChecker : public QObject
4141
{
4242
Q_OBJECT
4343
public:
44-
QgsGeometryChecker( const QList<QgsGeometryCheck *> &checks, const QMap<QString, QgsFeaturePool *> &featurePools );
44+
QgsGeometryChecker( const QList<QgsGeometryCheck *> &checks, QgsGeometryCheckContext *context SIP_TRANSFER, const QMap<QString, QgsFeaturePool *> &featurePools );
4545
~QgsGeometryChecker() override;
4646
QFuture<void> execute( int *totalSteps = nullptr );
4747
bool fixError( QgsGeometryCheckError *error, int method, bool triggerRepaint = false );
@@ -67,7 +67,7 @@ class ANALYSIS_EXPORT QgsGeometryChecker : public QObject
6767
};
6868

6969
QList<QgsGeometryCheck *> mChecks;
70-
QgsGeometryCheckContext *mContext;
70+
QgsGeometryCheckContext *mContext = nullptr;
7171
QList<QgsGeometryCheckError *> mCheckErrors;
7272
QStringList mMessages;
7373
QMutex mErrorListMutex;

‎src/plugins/geometry_checker/qgsgeometrycheckersetuptab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ void QgsGeometryCheckerSetupTab::runChecks()
437437
checks.append( check );
438438
}
439439
}
440-
QgsGeometryChecker *checker = new QgsGeometryChecker( checks, featurePools );
440+
QgsGeometryChecker *checker = new QgsGeometryChecker( checks, context, featurePools );
441441

442442
emit checkerStarted( checker );
443443

0 commit comments

Comments
 (0)
Please sign in to comment.