Open GoogleCodeExporter opened 9 years ago
This seems to fix this issue for me. Do you have a code review process? If so I
can
fix it up and add unit tests
Index: trunk/sfapi/src/main/flex/sfapi/core/AppTreeParser.as
===================================================================
diff -u -N -r5064 -r5481
--- trunk/sfapi/src/main/flex/sfapi/core/AppTreeParser.as (.../AppTreeParser.as)
(revision 5064)
+++ trunk/sfapi/src/main/flex/sfapi/core/AppTreeParser.as (.../AppTreeParser.as)
(revision 5481)
@@ -190,6 +190,10 @@
*/
private function hasFirstChild(node:AppTreeNode):Boolean
{
+ if (node == null || node.child == null){
+ return false;
+ }
+
if(node.child.hasOwnProperty("numChildren") && node.child.numChildren > 0)
{
firstNode = new AppTreeNode(node.child.getChildAt(0), 0, false);
@@ -331,7 +335,7 @@
*/
private function assignID(node:Object):void
{
- if(node.hasOwnProperty("id") && node.hasOwnProperty("toolTip"))
+ if(node != null && node.hasOwnProperty("id") &&
node.hasOwnProperty("toolTip"))
{
if(node.id == null)
{
Original comment by anderson...@gmail.com
on 3 May 2010 at 9:17
Original issue reported on code.google.com by
anderson...@gmail.com
on 3 May 2010 at 2:21