mirror of
				https://github.com/YACReader/yacreader
				synced 2025-11-04 01:05:06 -05:00 
			
		
		
		
	Add nullptr check
This commit is contained in:
		@ -142,7 +142,9 @@ void InfoComicsView::setModel(ComicModel *model)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void InfoComicsView::setCurrentIndex(const QModelIndex &index)
 | 
					void InfoComicsView::setCurrentIndex(const QModelIndex &index)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    if (list != nullptr) {
 | 
				
			||||||
    QQmlProperty(list, "currentIndex").write(index.row());
 | 
					    QQmlProperty(list, "currentIndex").write(index.row());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    setCurrentIndex(index.row());
 | 
					    setCurrentIndex(index.row());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user