mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 20:56:39 +00:00 
			
		
		
		
	fixed broken iterator
This commit is contained in:
		
							parent
							
								
									8a05c0e5c0
								
							
						
					
					
						commit
						994159fafd
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		|  | @ -42,9 +42,6 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells() | |||
|             if (!mSelection.has (iter->first) || index==-1 || | ||||
|                 cells.getRecord (index).mState==CSMWorld::RecordBase::State_Deleted) | ||||
|             { | ||||
|                 delete iter->second; | ||||
|                 mCells.erase (iter); | ||||
| 
 | ||||
|                 // delete overlays
 | ||||
|                 std::map<CSMWorld::CellCoordinates, TextOverlay *>::iterator itOverlay = mTextOverlays.find(iter->first); | ||||
|                 if(itOverlay != mTextOverlays.end()) | ||||
|  | @ -56,7 +53,9 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells() | |||
|                 // destroy manual objects
 | ||||
|                 getSceneManager()->destroyManualObject("manual"+iter->first.getId(mWorldspace)); | ||||
| 
 | ||||
|                 iter++; | ||||
|                 delete iter->second; | ||||
|                 mCells.erase (iter++); | ||||
| 
 | ||||
|                 modified = true; | ||||
|             } | ||||
|             else | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue