From 6d2ea28108f11dcd657f956d84cf1ff069fb50b4 Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Fri, 10 Apr 2020 22:52:19 +0200 Subject: [PATCH] Fix last query not closed in profiler --- jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java b/jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java index e5673df53..30fc2b4b2 100644 --- a/jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java +++ b/jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java @@ -38,6 +38,7 @@ public class DetailedProfiler implements AppProfiler { @Override public void appStep(AppStep step) { + curAppPath = step.name(); if (step == AppStep.BeginFrame) { @@ -102,7 +103,10 @@ public class DetailedProfiler implements AppProfiler { private void closeFrame() { //close frame if (data != null) { - + if (ongoingGpuProfiling && renderer != null) { + renderer.stopProfiling(); + ongoingGpuProfiling = false; + } prevPath = null; for (StatLine statLine : data.values()) {