summaryrefslogtreecommitdiff
path: root/src/positioning
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-12-06 20:46:30 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-12-11 00:15:00 +0000
commit30425c98757118985b91d1230101f13effeac54a (patch)
tree58723ca690a099b5bfe94d7462c9882f0cec65fa /src/positioning
parent0b742aee9fb4bde4d754f62c195d8a2e831355e8 (diff)
downloadqtlocation-30425c98757118985b91d1230101f13effeac54a.tar.gz
Check for validity before uniting geo rectangles
Change-Id: Ibecff0e0823b321ed5fcdd149de1a9d542ee5b4a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/positioning')
-rw-r--r--src/positioning/qgeorectangle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/positioning/qgeorectangle.cpp b/src/positioning/qgeorectangle.cpp
index 337b4c76..bb2debcf 100644
--- a/src/positioning/qgeorectangle.cpp
+++ b/src/positioning/qgeorectangle.cpp
@@ -804,7 +804,8 @@ void QGeoRectangle::extendRectangle(const QGeoCoordinate &coordinate)
QGeoRectangle QGeoRectangle::united(const QGeoRectangle &rectangle) const
{
QGeoRectangle result(*this);
- result |= rectangle;
+ if (rectangle.isValid())
+ result |= rectangle;
return result;
}