mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-25 11:26:37 +00:00 
			
		
		
		
	Fix exception closing container window
This commit is contained in:
		
							parent
							
								
									d97615d5d8
								
							
						
					
					
						commit
						c4ab2f417a
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -242,9 +242,11 @@ namespace MWGui | ||||||
|     { |     { | ||||||
|         WindowBase::close(); |         WindowBase::close(); | ||||||
| 
 | 
 | ||||||
|  |         if (dynamic_cast<PickpocketItemModel*>(mModel) | ||||||
|                 // Make sure we were actually closed, rather than just temporarily hidden (e.g. console or main menu opened)
 |                 // Make sure we were actually closed, rather than just temporarily hidden (e.g. console or main menu opened)
 | ||||||
|         if (!MWBase::Environment::get().getWindowManager()->containsMode(GM_Container) |                 && !MWBase::Environment::get().getWindowManager()->containsMode(GM_Container) | ||||||
|                 && !mPickpocketDetected // If it was already detected while taking an item, no need to check now
 |                 // If it was already detected while taking an item, no need to check now
 | ||||||
|  |                 && !mPickpocketDetected | ||||||
|                 ) |                 ) | ||||||
|         { |         { | ||||||
|             MWMechanics::Pickpocket pickpocket(MWBase::Environment::get().getWorld()->getPlayer().getPlayer(), |             MWMechanics::Pickpocket pickpocket(MWBase::Environment::get().getWorld()->getPlayer().getPlayer(), | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue