Revision: 48407
          http://brlcad.svn.sourceforge.net/brlcad/?rev=48407&view=rev
Author:   starseeker
Date:     2012-01-11 17:32:53 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
Make sure we have pt_prev before proceeding to use it - CID 266

Modified Paths:
--------------
    brlcad/trunk/src/libdm/dm-plot.c

Modified: brlcad/trunk/src/libdm/dm-plot.c
===================================================================
--- brlcad/trunk/src/libdm/dm-plot.c    2012-01-11 17:29:36 UTC (rev 48406)
+++ brlcad/trunk/src/libdm/dm-plot.c    2012-01-11 17:32:53 UTC (rev 48407)
@@ -242,6 +242,7 @@
                                pt_prev = pt;
                                continue;
                            } else {
+                                if (pt_prev) {
                                fastf_t alpha;
                                vect_t diff;
                                point_t tmp_pt;
@@ -251,9 +252,11 @@
                                alpha = (dist_prev - delta) / (dist_prev - 
dist);
                                VJOIN1(tmp_pt, *pt_prev, alpha, diff);
                                MAT4X3PNT(fin, plotmat, tmp_pt);
+                                }
                            }
                        } else {
                            if (dist_prev <= 0.0) {
+                               if (pt_prev) {
                                fastf_t alpha;
                                vect_t diff;
                                point_t tmp_pt;
@@ -264,6 +267,7 @@
                                VJOIN1(tmp_pt, *pt_prev, alpha, diff);
                                MAT4X3PNT(last, plotmat, tmp_pt);
                                MAT4X3PNT(fin, plotmat, *pt);
+                                }
                            } else {
                                MAT4X3PNT(fin, plotmat, *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