Revision: 77955
http://sourceforge.net/p/brlcad/code/77955
Author: starseeker
Date: 2020-12-10 17:12:53 +0000 (Thu, 10 Dec 2020)
Log Message:
-----------
Fix check for null vls when trying to write out debug message when shading
invalid brep objects. Was causing a crash.
Modified Paths:
--------------
brlcad/trunk/NEWS
brlcad/trunk/src/libbrep/cdt/fast.cpp
Modified: brlcad/trunk/NEWS
===================================================================
--- brlcad/trunk/NEWS 2020-12-10 15:26:39 UTC (rev 77954)
+++ brlcad/trunk/NEWS 2020-12-10 17:12:53 UTC (rev 77955)
@@ -13,6 +13,7 @@
--- 2020-xx-xx Release 7.32.2 ---
----------------------------------------------------------------------
+* fixed crash when trying to shade invalid breps - Cliff Yapp
* changed 'mvall' to rename all refs even w/ no object - Sean Morrison
* fixed MGED search command crash on empty database - Sean Morrison
* improved performance calculating BoT bounding boxes - Vikram Atreya
Modified: brlcad/trunk/src/libbrep/cdt/fast.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt/fast.cpp 2020-12-10 15:26:39 UTC (rev
77954)
+++ brlcad/trunk/src/libbrep/cdt/fast.cpp 2020-12-10 17:12:53 UTC (rev
77955)
@@ -1944,17 +1944,19 @@
if (!brep->IsValid(&tl)) {
//for now try to draw even if it's invalid, but report if the
//user is listening
- if (vls && wstr.Length() > 0) {
- ON_String onstr = ON_String(wstr);
- const char *isvalidinfo = onstr.Array();
- bu_vls_strcat(vls, "brep (");
- bu_vls_strcat(vls, solid_name);
- bu_vls_strcat(vls, ") is NOT valid:");
- bu_vls_strcat(vls, isvalidinfo);
- } else {
- bu_vls_strcat(vls, "brep (");
- bu_vls_strcat(vls, solid_name);
- bu_vls_strcat(vls, ") is NOT valid.");
+ if (vls) {
+ if (wstr.Length() > 0) {
+ ON_String onstr = ON_String(wstr);
+ const char *isvalidinfo = onstr.Array();
+ bu_vls_strcat(vls, "brep (");
+ bu_vls_strcat(vls, solid_name);
+ bu_vls_strcat(vls, ") is NOT valid:");
+ bu_vls_strcat(vls, isvalidinfo);
+ } else {
+ bu_vls_strcat(vls, "brep (");
+ bu_vls_strcat(vls, solid_name);
+ bu_vls_strcat(vls, ") is NOT valid.");
+ }
}
}
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