diff options
| author | 2020-05-07 16:47:00 +0000 | |
|---|---|---|
| committer | 2020-05-07 16:47:00 +0000 | |
| commit | bd1a5621b69c3f4ac20537c76992e0617e5bb4cd (patch) | |
| tree | 4c9266f64a884cf806a8bbd5e65e514eb9fda06b /libs/ui/Region.cpp | |
| parent | b1a1627da8acb98229f5bfa1ff2a44b06114b962 (diff) | |
| parent | fb9fcdae2f67ebef2ab6522fd2b49a57f9c28dd2 (diff) | |
Merge "Add test to call setInputWindows twice" into rvc-dev
Diffstat (limited to 'libs/ui/Region.cpp')
| -rw-r--r-- | libs/ui/Region.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp index 82ce757d5a..e01309b679 100644 --- a/libs/ui/Region.cpp +++ b/libs/ui/Region.cpp @@ -224,6 +224,11 @@ Region& Region::operator = (const Region& rhs) validate(*this, "this->operator="); validate(rhs, "rhs.operator="); #endif + if (this == &rhs) { + // Already equal to itself + return *this; + } + mStorage.clear(); mStorage.insert(mStorage.begin(), rhs.mStorage.begin(), rhs.mStorage.end()); return *this; |