mirror of
git://projects.qi-hardware.com/nanomap.git
synced 2024-11-28 02:44:59 +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)
|
void SearchWidget::streetChanged(const QString &street)
|
||||||
{
|
{
|
||||||
if (m_loaded) {
|
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;
|
QStringList suggestions, inputSuggestions;
|
||||||
bool found = m_addrLookup->GetStreetSuggestions(street, 20, &suggestions, &inputSuggestions);
|
bool found = m_addrLookup->GetStreetSuggestions(street, 20, &suggestions, &inputSuggestions);
|
||||||
if (found) {
|
if (found) {
|
||||||
|
Loading…
Reference in New Issue
Block a user