Skip to content

Commit 25980ab

Browse files
committedApr 1, 2019
Fix crash in stats summary on debug builds
1 parent 9820e6b commit 25980ab

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎src/core/qgsstatisticalsummary.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ QgsStatisticalSummary::QgsStatisticalSummary( Statistics stats )
3030
reset();
3131
}
3232

33+
void QgsStatisticalSummary::setStatistics( QgsStatisticalSummary::Statistics stats )
34+
{
35+
mStatistics = stats;
36+
reset();
37+
}
38+
3339
void QgsStatisticalSummary::reset()
3440
{
3541
mFirst = std::numeric_limits<double>::quiet_NaN();

‎src/core/qgsstatisticalsummary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class CORE_EXPORT QgsStatisticalSummary
9090
* \param stats flags for statistics to calculate
9191
* \see statistics
9292
*/
93-
void setStatistics( QgsStatisticalSummary::Statistics stats ) { mStatistics = stats; }
93+
void setStatistics( QgsStatisticalSummary::Statistics stats );
9494

9595
/**
9696
* Resets the calculated values

0 commit comments

Comments
 (0)
Please sign in to comment.