Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
Bug 384515 - ASSERT: null node when moving the root node in a places …
Browse files Browse the repository at this point in the history
…tree. r=dietrich.
  • Loading branch information
mozilla.mano@sent.com committed Jun 16, 2007
1 parent 56a3006 commit 7d4df6b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions browser/components/places/content/tree.xml
Expand Up @@ -675,11 +675,15 @@
var nodes = this.getSelectionNodes();
for (var i = 0; i < nodes.length; ++i) {
var node = nodes[i];
// Disallow dragging the root node of a tree
var parent = node.parent;
if (!parent)
throw Cr.NS_OK;
// If this node is part of a readonly container (e.g. a livemark) it
// cannot be moved, only copied, so we must change the action used
// by the drag session.
var parent = node.parent;
if (PlacesUtils.nodeIsReadOnly(parent)) {
dragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_COPY;
break;
Expand Down

0 comments on commit 7d4df6b

Please sign in to comment.