← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10480: DV, nullpointer vulnerability

 

------------------------------------------------------------
revno: 10480
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-04-04 20:07:23 +0200
message:
  DV, nullpointer vulnerability
modified:
  dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitChildrenAction.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitChildrenAction.java'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitChildrenAction.java	2012-06-06 12:50:27 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitChildrenAction.java	2013-04-04 18:07:23 +0000
@@ -85,11 +85,11 @@
         throws Exception
     {
         OrganisationUnit unit = organisationUnitService.getOrganisationUnit( node );
-        
-        int level = organisationUnitService.getLevelOfOrganisationUnit( unit.getId() ) + 1;
-        
+
         if ( unit != null )
         {
+            int level = organisationUnitService.getLevelOfOrganisationUnit( unit.getId() ) + 1;
+        
             units = new ArrayList<OrganisationUnit>( unit.getChildren() );
             
             for ( OrganisationUnit organisationUnit : units )