diff options
| author | 2018-03-29 09:03:41 -0400 | |
|---|---|---|
| committer | 2018-03-29 09:03:41 -0400 | |
| commit | 4900c51864d7312090e14e17d339a196350e7c9a (patch) | |
| tree | d06aea6c367b744b02a7d10e0c435b8337244b92 /src | |
| parent | Merge pull request #286 from N00byKing/citratoyuzuagain (diff) | |
| parent | result: Check against self-assignment in ResultVal's copy assignment operator (diff) | |
| download | yuzu-4900c51864d7312090e14e17d339a196350e7c9a.tar.gz yuzu-4900c51864d7312090e14e17d339a196350e7c9a.tar.xz yuzu-4900c51864d7312090e14e17d339a196350e7c9a.zip | |
Merge pull request #289 from lioncash/self-assign
result: Check against self-assignment in ResultVal's copy assignment operator
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/result.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 97fef7a48..052f49979 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h | |||
| @@ -200,6 +200,9 @@ public: | |||
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | ResultVal& operator=(const ResultVal& o) { | 202 | ResultVal& operator=(const ResultVal& o) { |
| 203 | if (this == &o) { | ||
| 204 | return *this; | ||
| 205 | } | ||
| 203 | if (!empty()) { | 206 | if (!empty()) { |
| 204 | if (!o.empty()) { | 207 | if (!o.empty()) { |
| 205 | object = o.object; | 208 | object = o.object; |