From 39c5c9fb1a54c882541eba6b3212b1eb31dffe6a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 5 Nov 2009 17:01:29 +0100 Subject: This should fix bookmarks toolbar crash on adding a new bookmark. At least it shouldn't be dangerous.. :) --- src/bookmarks.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index 815b2f56..5f1ea393 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -219,13 +219,16 @@ void BookmarkProvider::slotBookmarksChanged(const QString &group, const QString if (toolBarGroup.isNull()) return; - m_bookmarkToolBar->clear(); // FIXME CRASH - - KBookmark bookmark = toolBarGroup.first(); - while (!bookmark.isNull()) + if(m_bookmarkToolBar) { - m_bookmarkToolBar->addAction(fillBookmarkBar(bookmark)); - bookmark = toolBarGroup.next(bookmark); + m_bookmarkToolBar->clear(); // FIXME CRASH + + KBookmark bookmark = toolBarGroup.first(); + while (!bookmark.isNull()) + { + m_bookmarkToolBar->addAction(fillBookmarkBar(bookmark)); + bookmark = toolBarGroup.next(bookmark); + } } } -- cgit v1.2.1