mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 00:40:06 +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
				
			
		|  | @ -117,16 +117,17 @@ void ImGuiContextModel::DestroyContext(const std::string& name) | |||
| 
 | ||||
|    if (it != p->contexts_.end()) | ||||
|    { | ||||
|       const int position = it - p->contexts_.begin(); | ||||
| 
 | ||||
|       // Destroy context
 | ||||
|       ImGui::SetCurrentContext(it->context_); | ||||
|       ImGui::DestroyContext(); | ||||
|       const int     position = it - p->contexts_.begin(); | ||||
|       ImGuiContext* context  = it->context_; | ||||
| 
 | ||||
|       // Erase context from index
 | ||||
|       beginRemoveRows(QModelIndex(), position, position); | ||||
|       p->contexts_.erase(it); | ||||
|       endRemoveRows(); | ||||
| 
 | ||||
|       // Destroy context
 | ||||
|       ImGui::SetCurrentContext(context); | ||||
|       ImGui::DestroyContext(); | ||||
|    } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat