# HG changeset patch
# User neil@parkwaycc.co.uk
# Date 1191845451 25200
# Mon Oct 08 05:10:51 2007 -0700
# Node ID b70b30d73a629b87fcd738bc62e0927872002f83
# Parent 6893956d4e092c5afc0797fcdfbe8c4e5050d9c7
Ensure the tree selection exists before trying to do things to it b=397788 r=jag
diff --git a/suite/components/autocomplete/resources/content/autocomplete.xml b/suite/components/autocomplete/resources/content/autocomplete.xml
--- a/suite/components/autocomplete/resources/content/autocomplete.xml
+++ b/suite/components/autocomplete/resources/content/autocomplete.xml
@@ -1436,16 +1436,21 @@
document.getAnonymousElementByAttribute(this, "anonid", "treebody");
null
+
+
+
0
- this.view.selection.clearSelection();
+ this.selection.clearSelection();
- if (!this.view || !this.view.selection.count)
+ if (!this.view || !this.selection.count)
return -1;
var start = {}, end = {};
this.view.selection.getRangeAt(0, start, end);
return start.value;
if (this.view) {
- this.view.selection.select(val);
+ this.selection.select(val);
if (val >= 0) {
this.view.selection.currentIndex = -1;
this.tree.treeBoxObject.ensureRowIsVisible(val);
}
}
return val;