Skip to content

Commit bd00b0f

Browse files
author
Sandro Santilli
committed
Initialize all members in Interval constructor.
Fixes memory conditional jumps depending on uninitialized values and as a consequence the unstable results from qgis_expressiontest Closes #6877
1 parent 677095f commit bd00b0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/qgsexpression.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class CORE_EXPORT QgsExpression
358358
static const int HOUR = 60 * 60;
359359
static const int MINUTE = 60;
360360
public:
361-
Interval( double seconds = 0 ) { mSeconds = seconds; }
361+
Interval( double seconds = 0 ): mSeconds(seconds), mValid(true) { }
362362
~Interval();
363363
double years() { return mSeconds / YEARS;}
364364
double months() { return mSeconds / MONTHS; }

0 commit comments

Comments
 (0)