From c08b5850177da5829a5cc304a230bda8f74f371e Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Mon, 29 Dec 2014 10:58:48 -0500 Subject: [PATCH] namedPoints() bug fix - canConvert isn't quite good enough, we need to explicitly check that the coordinates aren't NaN --- openbr/openbr_plugin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 44c94a3..9ece43f 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -188,8 +188,11 @@ QList File::namedPoints() const QList landmarks; foreach (const QString &key, localMetadata().keys()) { const QVariant &variant = m_metadata[key]; - if (variant.canConvert()) - landmarks.append(variant.value()); + if (variant.canConvert()) { + const QPointF point = variant.value(); + if (!std::isnan(point.x()) && !std::isnan(point.y())) + landmarks.append(point); + } } return landmarks; } -- libgit2 0.21.4