瀏覽代碼

Merge pull request #34028 from nekomatata/list-erase-not-found

Removed errors when List::erase() can't find the value
Rémi Verschelde 5 年之前
父節點
當前提交
c069f5f5ca
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/list.h

+ 1 - 1
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) {