소스 검색

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