On Thu, Oct 26, 2017 at 11:11 PM, Jason H <jh...@gmx.com> wrote: > > It sometimes works, sometimes doesn't.
Smells like a race. > But in my software it seems to come from line 42: > QList<QVector3D> hp = haystack_points[haystack_item]; > This may be a write operation, beware of operator [] with maps, notice at the ends of the docs: "If the map contains no item with key key, the function inserts a default-constructed value into the map with key key, and returns a reference to it." My advice is to declare your members in `PointsCompare` as const and take it from there. The compiler will complain, but changing the access (e.g. using `at()` instead of `[]`) to your members should fix it. Maybe my use of a class with mapped() is wrong? > Not that I could see.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest