mirror of https://github.com/procxx/kepka.git
				
				
				
			Fix crash in shared media save state.
This commit is contained in:
		
							parent
							
								
									ad6ddcb507
								
							
						
					
					
						commit
						5b7059dccd
					
				|  | @ -930,11 +930,13 @@ void ListWidget::markLayoutsStale() { | ||||||
| 
 | 
 | ||||||
| void ListWidget::saveState(not_null<Memento*> memento) { | void ListWidget::saveState(not_null<Memento*> memento) { | ||||||
| 	if (_universalAroundId != kDefaultAroundId) { | 	if (_universalAroundId != kDefaultAroundId) { | ||||||
| 		memento->setAroundId(computeFullId(_universalAroundId)); |  | ||||||
| 		memento->setIdsLimit(_idsLimit); |  | ||||||
| 		auto state = countScrollState(); | 		auto state = countScrollState(); | ||||||
| 		memento->setScrollTopItem(computeFullId(state.item)); | 		if (state.item) { | ||||||
| 		memento->setScrollTopShift(state.shift); | 			memento->setAroundId(computeFullId(_universalAroundId)); | ||||||
|  | 			memento->setIdsLimit(_idsLimit); | ||||||
|  | 			memento->setScrollTopItem(computeFullId(state.item)); | ||||||
|  | 			memento->setScrollTopShift(state.shift); | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue