mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 05:01:05 +01:00 
			
		
		
		
	Nav: Fixed rare crash when e.g. releasing Alt-key while focusing a window with a menu at the same frame as clearing the focus. This was in most noticeable in some back-ends with emits key release events when focusing another viewport. (#2609)
This commit is contained in:
		| @@ -7933,10 +7933,10 @@ static void ImGui::NavUpdate() | ||||
|         g.IO.NavInputsDownDuration[i] = (g.IO.NavInputs[i] > 0.0f) ? (g.IO.NavInputsDownDuration[i] < 0.0f ? 0.0f : g.IO.NavInputsDownDuration[i] + g.IO.DeltaTime) : -1.0f; | ||||
|  | ||||
|     // Process navigation init request (select first/default focus) | ||||
|     if (g.NavInitResultId != 0 && (!g.NavDisableHighlight || g.NavInitRequestFromMove)) | ||||
|     // In very rare cases g.NavWindow may be null (e.g. clearing focus after requesting an init request, which does happen when releasing Alt while clicking on void) | ||||
|     if (g.NavInitResultId != 0 && (!g.NavDisableHighlight || g.NavInitRequestFromMove) && g.NavWindow) | ||||
|     { | ||||
|         // Apply result from previous navigation init request (will typically select the first item, unless SetItemDefaultFocus() has been called) | ||||
|         IM_ASSERT(g.NavWindow); | ||||
|         if (g.NavInitRequestFromMove) | ||||
|             SetNavIDWithRectRel(g.NavInitResultId, g.NavLayer, g.NavInitResultRectRel); | ||||
|         else | ||||
|   | ||||
		Reference in New Issue
	
	Block a user