[Laszlo-checkins] r13835 - openlaszlo/trunk/lps/components/incubator/opttree
bargull@openlaszlo.org
bargull at openlaszlo.org
Fri May 8 08:12:06 PDT 2009
Author: bargull
Date: 2009-05-08 08:12:04 -0700 (Fri, 08 May 2009)
New Revision: 13835
Modified:
openlaszlo/trunk/lps/components/incubator/opttree/opttree.lzx
Log:
Change 20090506-bargull-iWV by bargull at dell--p4--2-53 on 2009-05-06 23:54:47
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix null-pointer dereferencing in opttree component
New Features:
Bugs Fixed: LPP-8128 (possible null-pointer dereferencing in opttree)
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
"opttreecontroller.getChildNodes" may return `null`, this needs to be handled in recursiveOpen() and setAllOpen().
Tests:
Modified: openlaszlo/trunk/lps/components/incubator/opttree/opttree.lzx
===================================================================
--- openlaszlo/trunk/lps/components/incubator/opttree/opttree.lzx 2009-05-08 15:10:38 UTC (rev 13834)
+++ openlaszlo/trunk/lps/components/incubator/opttree/opttree.lzx 2009-05-08 15:12:04 UTC (rev 13835)
@@ -70,8 +70,10 @@
opttreecontroller.lock( p );
this.setOpen( p , val );
var c = opttreecontroller.getChildNodes( p );
- for ( var k=0, len=c.length; k<len; k++){
- this.recursiveOpen( c[ k ] , val );
+ if (c != null) {
+ for ( var k=0, len=c.length; k<len; k++){
+ this.recursiveOpen( c[ k ] , val );
+ }
}
opttreecontroller.unlock( p );
]]>
@@ -80,11 +82,13 @@
<method name="setAllOpen" args="val">
<![CDATA[
var ilist = opttreecontroller.getChildNodes( datapath.p );
- opttreecontroller.lock( "ao" );
- for ( var k=0, len=ilist.length; k<len; k++ ){
- this.recursiveOpen( ilist[ k ], val );
+ if (ilist != null) {
+ opttreecontroller.lock( "ao" );
+ for ( var k=0, len=ilist.length; k<len; k++ ){
+ this.recursiveOpen( ilist[ k ], val );
+ }
+ opttreecontroller.unlock( "ao" );
}
- opttreecontroller.unlock( "ao" );
]]>
</method>
More information about the Laszlo-checkins
mailing list