From 02a1103540f4673008f4b8e8c7d23ff3cdcb769a Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Wed, 3 Mar 2004 03:14:56 +0000 Subject: [PATCH] don't call PstatCollector.is_started() if opt 4 --- panda/src/display/graphicsEngine.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index 08e2c16e2a..71168b86e4 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -28,6 +28,7 @@ #include "clockObject.h" #include "pStatTimer.h" #include "pStatClient.h" +#include "pStatCollector.h" #include "mutexHolder.h" #include "string_utils.h" @@ -95,9 +96,11 @@ GraphicsEngine(Pipeline *pipeline) : //////////////////////////////////////////////////////////////////// GraphicsEngine:: ~GraphicsEngine() { +#ifdef DO_PSTATS if (_app_pcollector.is_started()) { _app_pcollector.stop(); } +#endif remove_all_windows(); } @@ -428,9 +431,11 @@ void GraphicsEngine:: render_frame() { // Anything that happens outside of GraphicsEngine::render_frame() // is deemed to be App. +#ifdef DO_PSTATS if (_app_pcollector.is_started()) { _app_pcollector.stop(); } +#endif // We hold the GraphicsEngine mutex while we wait for all of the // threads. Doing this puts us at risk for deadlock if any of the