[Laszlo-checkins] r13913 - openlaszlo/trunk/WEB-INF/lps/lfc/helpers

bargull@openlaszlo.org bargull at openlaszlo.org
Fri May 15 13:39:56 PDT 2009


Author: bargull
Date: 2009-05-15 13:39:53 -0700 (Fri, 15 May 2009)
New Revision: 13913

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
Log:
Change 20090515-bargull-Jjh by bargull at dell--p4--2-53 on 2009-05-15 17:14:45
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: nullpointer exception in dataselectionmanager

New Features:

Bugs Fixed: LPP-8196 (combobox with dataoption="lazy" may cause nullpointer dereferencing)

Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
Both, "makeSelected" and "isSelected", may dereference a null-pointer. So add a simple check to avoid runtime errors in dhtml resp. swf9. 
    

Tests:
see bugreport



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs	2009-05-15 20:25:06 UTC (rev 13912)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs	2009-05-15 20:39:53 UTC (rev 13913)
@@ -102,7 +102,7 @@
         if (this.manager == null) this.manager = o.cloneManager;//try to get a cloneManager
 
         var so /*:LzDataNodeMixin*/ = o.datapath.p;
-        if (! so.sel) {
+        if (so && ! so.sel) {
             so.sel = true;
             this.selected.push( so );
             if (this.manager == null) {
@@ -211,7 +211,8 @@
     override function isSelected (o /*:LzView*/) :Boolean {
         if (this.manager == null) this.manager = o.cloneManager;//try to get a cloneManager
 
-        return o.datapath.p.sel;
+        var so = o.datapath.p;
+        return so && so.sel;
     }
 
     /**



More information about the Laszlo-checkins mailing list