Skip to content
Snippets Groups Projects
Commit e9add275 authored by Koen Hillewaert's avatar Koen Hillewaert
Browse files

Modification to avoid seg fault while stopping Gmsh (on linux)

parent 68a81283
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
#include <myadt.hpp>
#include <cstdlib>
namespace netgen
{
......@@ -28,6 +29,7 @@ namespace netgen
total_timer = CreateTimer ("total CPU time");
StartTimer (total_timer);
envNGPROFILE = getenv ("NGPROFILE");
}
NgProfiler :: ~NgProfiler()
......@@ -43,7 +45,7 @@ namespace netgen
// which leads to an "order of destruction"-problem,
// thus we use the C-variant:
if (getenv ("NGPROFILE"))
if (envNGPROFILE)
{
char filename[100];
#ifdef PARALLEL
......
......@@ -30,7 +30,9 @@ class NgProfiler
static string names[SIZE];
static int usedcounter[SIZE];
bool envNGPROFILE;
int total_timer;
public:
NgProfiler();
~NgProfiler();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment