Revision: 76876
http://sourceforge.net/p/brlcad/code/76876
Author: starseeker
Date: 2020-08-21 20:45:06 +0000 (Fri, 21 Aug 2020)
Log Message:
-----------
Sumagna Das reported that drawing a VOL primitive with missing data file was
crashing MGED. Plotting routine wasn't validating the map in vip before trying
to access it. Check first, and simply return if no map is present (nothing to
draw.)
Modified Paths:
--------------
brlcad/trunk/NEWS
brlcad/trunk/src/librt/primitives/vol/vol.c
Modified: brlcad/trunk/NEWS
===================================================================
--- brlcad/trunk/NEWS 2020-08-21 20:27:20 UTC (rev 76875)
+++ brlcad/trunk/NEWS 2020-08-21 20:45:06 UTC (rev 76876)
@@ -13,6 +13,7 @@
--- 2020-08-XX Release 7.32.X ---
----------------------------------------------------------------------
+* fixed crash when drawing a VOL with missing data - Cliff Yapp
* removed facetall.sh script(use MGED facetize cmd) - Cliff Yapp
* dynamic LIBGED command loading in MGED & Archer - Cliff Yapp
* dynamic LIBDM display manager loading in MGED & Archer - Cliff Yapp
Modified: brlcad/trunk/src/librt/primitives/vol/vol.c
===================================================================
--- brlcad/trunk/src/librt/primitives/vol/vol.c 2020-08-21 20:27:20 UTC (rev
76875)
+++ brlcad/trunk/src/librt/primitives/vol/vol.c 2020-08-21 20:45:06 UTC (rev
76876)
@@ -983,6 +983,10 @@
vip = (struct rt_vol_internal *)ip->idb_ptr;
RT_VOL_CK_MAGIC(vip);
+ if (!vip->map) {
+ return 1;
+ }
+
/*
* Scan across in Z & X. For each X position, scan down Y,
* looking for the longest run of edge.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits