summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-07-02 13:32:57 +0200
committerGitHub <noreply@github.com>2020-07-02 13:32:57 +0200
commitc069f5f5ca1168213632fd6cc3262878f04cc1b9 (patch)
tree15fe43e8f1ef7243d1cbe1bf04324a472dde5c41
parent90e81b7e2a73694da217986e91e39f5a7f181443 (diff)
parent45445e1b3164669989b18aa2c492c6afae832641 (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.h2
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) {