mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04: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