From dcd9fafa57174f7e2b8102adcf1c5701c43cffa9 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 20 Mar 2014 23:59:13 +0100 Subject: apply 2geom rev. 2169 (bug fix) (bzr r13175) --- src/2geom/generic-interval.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/2geom/generic-interval.h b/src/2geom/generic-interval.h index 41eaf59b0..f6d4718de 100644 --- a/src/2geom/generic-interval.h +++ b/src/2geom/generic-interval.h @@ -274,10 +274,12 @@ public: /** @brief Union with another interval, gracefully handling empty ones. */ void unionWith(GenericOptInterval const &a) { - if (*this) { // check that we are not empty - (*this)->unionWith(*a); - } else if (a) { - *this = *a; + if (a) { + if (*this) { // check that we are not empty + (*this)->unionWith(*a); + } else { + *this = *a; + } } } void intersectWith(GenericOptInterval const &o) { -- cgit v1.2.3