diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-08 00:48:09 +0200 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-08 00:48:09 +0200 | 
| commit | 98bed93b35be1308bd3d559f88574ab694298519 (patch) | |
| tree | 160f70a8bcf6e83e5c20a7cbba4e7a432321f5ff | |
| parent | removing rekonq name (more space for the smart bar) (diff) | |
| download | rekonq-98bed93b35be1308bd3d559f88574ab694298519.tar.xz | |
fixing right click rekonq crash (at least, hopefully..)
| -rw-r--r-- | src/webview.cpp | 17 | 
1 files changed, 10 insertions, 7 deletions
| diff --git a/src/webview.cpp b/src/webview.cpp index ac6f4566..1c46041c 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -184,13 +184,16 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)              if(!engine.isEmpty())              {                  service = KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(engine)); -                const QString searchProviderPrefix = *(service->property("Keys").toStringList().begin()) + keywordDelimiter; // FIXME crashed -                data.setData(searchProviderPrefix + "some keyword"); -                a = new KAction(service->name(), this); -                a->setIcon(Application::icon(KUrl(data.uri()))); -                a->setData(searchProviderPrefix); -                connect(a, SIGNAL(triggered(bool)), this, SLOT(slotSearch())); -                searchMenu->addAction(a); +                if(service) +                { +                    const QString searchProviderPrefix = *(service->property("Keys").toStringList().begin()) + keywordDelimiter; +                    data.setData(searchProviderPrefix + "some keyword"); +                    a = new KAction(service->name(), this); +                    a->setIcon(Application::icon(KUrl(data.uri()))); +                    a->setData(searchProviderPrefix); +                    connect(a, SIGNAL(triggered(bool)), this, SLOT(slotSearch())); +                    searchMenu->addAction(a); +                }              }          } | 
