mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 17:26:42 +00:00 
			
		
		
		
	Fix crash in the ESM reader, when list is empty (bug #4677)
This commit is contained in:
		
							parent
							
								
									c45ec9171b
								
							
						
					
					
						commit
						f9271fd7f0
					
				
					 2 changed files with 8 additions and 1 deletions
				
			
		|  | @ -139,6 +139,7 @@ | |||
|     Bug #4671: knownEffect functions should use modified Alchemy skill | ||||
|     Bug #4672: Pitch factor is handled incorrectly for crossbow animations | ||||
|     Bug #4674: Journal can be opened when settings window is open | ||||
|     Bug #4677: Crash in ESM reader when NPC record has DNAM record without DODT one | ||||
|     Feature #912: Editor: Add missing icons to UniversalId tables | ||||
|     Feature #1221: Editor: Creature/NPC rendering | ||||
|     Feature #1617: Editor: Enchantment effect record verifier | ||||
|  |  | |||
|  | @ -1,5 +1,7 @@ | |||
| #include "transport.hpp" | ||||
| 
 | ||||
| #include <components/debug/debuglog.hpp> | ||||
| 
 | ||||
| #include <components/esm/esmreader.hpp> | ||||
| #include <components/esm/esmwriter.hpp> | ||||
| 
 | ||||
|  | @ -16,7 +18,11 @@ namespace ESM | |||
|         } | ||||
|         else if (esm.retSubName().intval == ESM::FourCC<'D','N','A','M'>::value) | ||||
|         { | ||||
|             mList.back().mCellName = esm.getHString(); | ||||
|             const std::string name = esm.getHString(); | ||||
|             if (mList.empty()) | ||||
|                 Log(Debug::Warning) << "Encountered DNAM record without DODT record, skipped."; | ||||
|             else | ||||
|                 mList.back().mCellName = name; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue