fix: aborts when using a Qt build with assertions enabled
Preventing undefined behaviour hooray! :D Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
145da82cd8
commit
e5f6dc1b14
5 changed files with 27 additions and 5 deletions
|
@ -219,6 +219,10 @@ void ListModel::searchRequestFinished(QJsonDocument& doc)
|
|||
searchState = CanPossiblyFetchMore;
|
||||
}
|
||||
|
||||
// When you have a Qt build with assertions turned on, proceeding here will abort the application
|
||||
if (newList.size() == 0)
|
||||
return;
|
||||
|
||||
beginInsertRows(QModelIndex(), modpacks.size(), modpacks.size() + newList.size() - 1);
|
||||
modpacks.append(newList);
|
||||
endInsertRows();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue