diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-07-02 13:32:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-02 13:32:57 +0200 |
commit | c069f5f5ca1168213632fd6cc3262878f04cc1b9 (patch) | |
tree | 15fe43e8f1ef7243d1cbe1bf04324a472dde5c41 | |
parent | 90e81b7e2a73694da217986e91e39f5a7f181443 (diff) | |
parent | 45445e1b3164669989b18aa2c492c6afae832641 (diff) |
Merge pull request #34028 from nekomatata/list-erase-not-found
Removed errors when List::erase() can't find the value
-rw-r--r-- | core/list.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/list.h b/core/list.h index 6052a619fb..f850db5241 100644 --- a/core/list.h +++ b/core/list.h @@ -348,7 +348,7 @@ public: * erase an element in the list, by iterator pointing to it. Return true if it was found/erased. */ bool erase(const Element *p_I) { - if (_data) { + if (_data && p_I) { bool ret = _data->erase(p_I); if (_data->size_cache == 0) { |