Skip to content

Commit bdf062a

Browse files
committed
Fix crash in stats summary on debug builds
1 parent 6800b3d commit bdf062a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/core/qgsstatisticalsummary.cpp

+6
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
mCount = 0;

src/core/qgsstatisticalsummary.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class CORE_EXPORT QgsStatisticalSummary
8888
* \param stats flags for statistics to calculate
8989
* \see statistics
9090
*/
91-
void setStatistics( QgsStatisticalSummary::Statistics stats ) { mStatistics = stats; }
91+
void setStatistics( QgsStatisticalSummary::Statistics stats );
9292

9393
/**
9494
* Resets the calculated values

0 commit comments

Comments
 (0)