mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-30 21:30:05 +00:00 
			
		
		
		
	Fix ImGui context destruction order
This commit is contained in:
		
							parent
							
								
									399a07b1e2
								
							
						
					
					
						commit
						7ec12821b9
					
				
					 2 changed files with 7 additions and 6 deletions
				
			
		
							
								
								
									
										2
									
								
								external/imgui-backend-qt
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								external/imgui-backend-qt
									
										
									
									
										vendored
									
									
								
							|  | @ -1 +1 @@ | ||||||
| Subproject commit a914f1811185f5959d50f2a199420dee4d15ae74 | Subproject commit 9bddcf9a1a6ca63f71a953fc060d81545f36918a | ||||||
|  | @ -118,15 +118,16 @@ void ImGuiContextModel::DestroyContext(const std::string& name) | ||||||
|    if (it != p->contexts_.end()) |    if (it != p->contexts_.end()) | ||||||
|    { |    { | ||||||
|       const int     position = it - p->contexts_.begin(); |       const int     position = it - p->contexts_.begin(); | ||||||
| 
 |       ImGuiContext* context  = it->context_; | ||||||
|       // Destroy context
 |  | ||||||
|       ImGui::SetCurrentContext(it->context_); |  | ||||||
|       ImGui::DestroyContext(); |  | ||||||
| 
 | 
 | ||||||
|       // Erase context from index
 |       // Erase context from index
 | ||||||
|       beginRemoveRows(QModelIndex(), position, position); |       beginRemoveRows(QModelIndex(), position, position); | ||||||
|       p->contexts_.erase(it); |       p->contexts_.erase(it); | ||||||
|       endRemoveRows(); |       endRemoveRows(); | ||||||
|  | 
 | ||||||
|  |       // Destroy context
 | ||||||
|  |       ImGui::SetCurrentContext(context); | ||||||
|  |       ImGui::DestroyContext(); | ||||||
|    } |    } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat