aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/support')
-rw-r--r--engines/titanic/support/rect.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/titanic/support/rect.cpp b/engines/titanic/support/rect.cpp
index 5fce4402cb..b39ffc1c45 100644
--- a/engines/titanic/support/rect.cpp
+++ b/engines/titanic/support/rect.cpp
@@ -25,10 +25,11 @@
namespace Titanic {
void Rect::combine(const Rect &r) {
- if (isEmpty() || r.isEmpty())
- return;
-
- Common::Rect::extend(r);
+ if (isEmpty()) {
+ *this = r;
+ } else if (!r.isEmpty()) {
+ Common::Rect::extend(r);
+ }
}
void Rect::constrain(const Rect &r) {