2016-03-08 Carl Hetherington <cth@carlh.net>
+ * Fix occasional crash when opening the custom
+ colour conversion editor.
+
* Version 2.7.0 released.
2016-03-08 Carl Hetherington <cth@carlh.net>
s.imbue (std::locale::classic ());
s << std::setprecision (precision);
s << v;
- P r;
+ /* If the s >> r below fails to convert anything, we want r to
+ be left as a defined value. This construct (I believe) achieves
+ this by setting r to the default value of type P, even if P
+ is a POD type.
+ */
+ P r = P ();
s >> r;
return r;
}