Revision: 74686 http://sourceforge.net/p/brlcad/code/74686 Author: bob1961 Date: 2020-01-14 19:00:58 +0000 (Tue, 14 Jan 2020) Log Message: ----------- Added checks to disallow logging related to ged_facetize() when fileno(stderr) returns a value less than zero. This can happen on windows if the application is not a console application. This is effectively a punt --- more would need to be done to get this working in a non-console windows application
Modified Paths: -------------- brlcad/trunk/src/libged/facetize.cpp Modified: brlcad/trunk/src/libged/facetize.cpp =================================================================== --- brlcad/trunk/src/libged/facetize.cpp 2020-01-14 17:01:56 UTC (rev 74685) +++ brlcad/trunk/src/libged/facetize.cpp 2020-01-14 19:00:58 UTC (rev 74686) @@ -380,6 +380,9 @@ HIDDEN void _ged_facetize_log_nmg(struct _ged_facetize_opts *o) { + if (fileno(stderr) < 0) + return; + /* Seriously, bu_bomb, we don't want you blathering * to stderr... shut down stderr temporarily, assuming * we can find /dev/null or something similar */ @@ -409,6 +412,9 @@ HIDDEN void _ged_facetize_log_default(struct _ged_facetize_opts *o) { + if (fileno(stderr) < 0) + return; + /* Put stderr back */ if (o->fnull != -1) { fflush(stderr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits