diff --git a/camino/BookmarksService.mm b/camino/BookmarksService.mm index 82e41be1c361..2f3b7c8d57a1 100644 --- a/camino/BookmarksService.mm +++ b/camino/BookmarksService.mm @@ -453,7 +453,7 @@ BookmarksService::MoveBookmarkToFolder(nsIDOMElement* aBookmark, nsIDOMElement* void BookmarksService::DeleteBookmark(nsIDOMElement* aBookmark) { - if (!aBookmark) return; + if (!aBookmark || aBookmark == gToolbarRoot) return; nsCOMPtr oldParent; aBookmark->GetParentNode(getter_AddRefs(oldParent)); diff --git a/camino/src/bookmarks/BookmarksService.mm b/camino/src/bookmarks/BookmarksService.mm index 82e41be1c361..2f3b7c8d57a1 100644 --- a/camino/src/bookmarks/BookmarksService.mm +++ b/camino/src/bookmarks/BookmarksService.mm @@ -453,7 +453,7 @@ BookmarksService::MoveBookmarkToFolder(nsIDOMElement* aBookmark, nsIDOMElement* void BookmarksService::DeleteBookmark(nsIDOMElement* aBookmark) { - if (!aBookmark) return; + if (!aBookmark || aBookmark == gToolbarRoot) return; nsCOMPtr oldParent; aBookmark->GetParentNode(getter_AddRefs(oldParent)); diff --git a/chimera/BookmarksService.mm b/chimera/BookmarksService.mm index 82e41be1c361..2f3b7c8d57a1 100644 --- a/chimera/BookmarksService.mm +++ b/chimera/BookmarksService.mm @@ -453,7 +453,7 @@ BookmarksService::MoveBookmarkToFolder(nsIDOMElement* aBookmark, nsIDOMElement* void BookmarksService::DeleteBookmark(nsIDOMElement* aBookmark) { - if (!aBookmark) return; + if (!aBookmark || aBookmark == gToolbarRoot) return; nsCOMPtr oldParent; aBookmark->GetParentNode(getter_AddRefs(oldParent)); diff --git a/chimera/src/bookmarks/BookmarksService.mm b/chimera/src/bookmarks/BookmarksService.mm index 82e41be1c361..2f3b7c8d57a1 100644 --- a/chimera/src/bookmarks/BookmarksService.mm +++ b/chimera/src/bookmarks/BookmarksService.mm @@ -453,7 +453,7 @@ BookmarksService::MoveBookmarkToFolder(nsIDOMElement* aBookmark, nsIDOMElement* void BookmarksService::DeleteBookmark(nsIDOMElement* aBookmark) { - if (!aBookmark) return; + if (!aBookmark || aBookmark == gToolbarRoot) return; nsCOMPtr oldParent; aBookmark->GetParentNode(getter_AddRefs(oldParent));