Revision: 48405
          http://brlcad.svn.sourceforge.net/brlcad/?rev=48405&view=rev
Author:   starseeker
Date:     2012-01-11 17:20:03 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
Check for NULL lgt_entry. CID 264

Modified Paths:
--------------
    brlcad/trunk/src/lgt/reflect.c

Modified: brlcad/trunk/src/lgt/reflect.c
===================================================================
--- brlcad/trunk/src/lgt/reflect.c      2012-01-11 17:12:06 UTC (rev 48404)
+++ brlcad/trunk/src/lgt/reflect.c      2012-01-11 17:20:03 UTC (rev 48405)
@@ -934,7 +934,13 @@
 {
     fastf_t energy_attenuation = 1.0;
     fastf_t lgt_dir[3];
-    if (lgt_entry && !lgt_entry->beam)
+
+    if (lgt_entry == NULL) {
+        bu_log("Error - correct_Lgt - null lgt_entry supplied!\n");
+       return  energy_attenuation;
+    }
+
+    if (!lgt_entry->beam)
        return lgt_entry->energy;
 
     /* Vector to light src from surface contact pt. */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to