mirror of
git://projects.qi-hardware.com/nanomap.git
synced 2024-11-24 10:08:04 +02:00
do not crash if no city is selected
This commit is contained in:
parent
8a33464fa9
commit
223efe7457
@ -134,7 +134,10 @@ void SearchWidget::citySelected(QListWidgetItem *item)
|
||||
void SearchWidget::streetChanged(const QString &street)
|
||||
{
|
||||
if (m_loaded) {
|
||||
m_addrLookup->SelectPlace(m_cityList->currentItem()->data(Qt::UserRole).toInt());
|
||||
QListWidgetItem *item = m_cityList->currentItem();
|
||||
if (item) {
|
||||
m_addrLookup->SelectPlace(item->data(Qt::UserRole).toInt());
|
||||
}
|
||||
QStringList suggestions, inputSuggestions;
|
||||
bool found = m_addrLookup->GetStreetSuggestions(street, 20, &suggestions, &inputSuggestions);
|
||||
if (found) {
|
||||
|
Loading…
Reference in New Issue
Block a user