1
0
Fork 0

Launcher: fix a crash on searching locations

When hitting return multiple times, could hit a null-pointer
crash here.
This commit is contained in:
James Turner 2016-06-08 15:45:00 +01:00
parent 9c612af124
commit 3a15b2f979

View file

@ -316,6 +316,10 @@ private slots:
void onSearchResultsPoll() void onSearchResultsPoll()
{ {
if (m_search.isNull()) {
return;
}
PositionedIDVec newIds = m_search->results(); PositionedIDVec newIds = m_search->results();
beginInsertRows(QModelIndex(), m_ids.size(), newIds.size() - 1); beginInsertRows(QModelIndex(), m_ids.size(), newIds.size() - 1);