From 46739bd52540e867b600b18987b9fed17c912418 Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Tue, 20 Aug 2002 01:10:56 +0000 Subject: [PATCH] Fix bug 162776: prevent the toolbar root bookmarks folder from being deleted by a drag to the trash. --- camino/BookmarksService.mm | 2 +- camino/src/bookmarks/BookmarksService.mm | 2 +- chimera/BookmarksService.mm | 2 +- chimera/src/bookmarks/BookmarksService.mm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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));