mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:02:44 +00:00 
			
		
		
		
	SpaceAnalyzer: Fix the crash caused by double click
With #12480, Breadcrumbbar's on_focus_change() uses on_click(). In SpaceAnalyzer, double clicking triggers the TreeWidgetMap's on_path_change(), which triggers Breadcrumbbar's on_focus_change(), which also triggers the TreeWidgetMap's on_path_change() again. This resulted in use-after-free of Breadcrumbbar, thus resulted in the crash. Not updating the TreeWidgetMap's viewpoint recursively solves the issue.
This commit is contained in:
		
							parent
							
								
									01bd3c5563
								
							
						
					
					
						commit
						fe7d801dd9
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -341,6 +341,8 @@ void TreeMapWidget::set_tree(RefPtr<TreeMap> tree) | ||||||
| 
 | 
 | ||||||
| void TreeMapWidget::set_viewpoint(size_t viewpoint) | void TreeMapWidget::set_viewpoint(size_t viewpoint) | ||||||
| { | { | ||||||
|  |     if (m_viewpoint == viewpoint) | ||||||
|  |         return; | ||||||
|     if (viewpoint > m_path.size()) |     if (viewpoint > m_path.size()) | ||||||
|         viewpoint = m_path.size(); |         viewpoint = m_path.size(); | ||||||
|     m_viewpoint = viewpoint; |     m_viewpoint = viewpoint; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Arif Orhun Uzun
						Arif Orhun Uzun