Fix incorrect assert in Outliner ID deletion
Mistake inaa3a4973a3. The expanded `ELEM()` check would include `0 && te->idcode != 0`, which always evaluates to `false`/`0`. That wouldn't cause the asset to fail, but the `te->idcode` part would never be checked. Fixed the error and cleaned up the check against "0" with a check against `TSE_SOME_ID`, seeb9e54566e3.
This commit is contained in:
		@@ -464,7 +464,8 @@ static void id_delete(bContext *C, ReportList *reports, TreeElement *te, TreeSto
 | 
			
		||||
  ID *id = tselem->id;
 | 
			
		||||
 | 
			
		||||
  BLI_assert(id != NULL);
 | 
			
		||||
  BLI_assert(ELEM(tselem->type, 0 && te->idcode != 0, TSE_LAYER_COLLECTION));
 | 
			
		||||
  BLI_assert(((tselem->type == TSE_SOME_ID) && (te->idcode != 0)) ||
 | 
			
		||||
             (tselem->type == TSE_LAYER_COLLECTION));
 | 
			
		||||
  UNUSED_VARS_NDEBUG(te);
 | 
			
		||||
 | 
			
		||||
  if (te->idcode == ID_LI && ((Library *)id)->parent != NULL) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user