summaryrefslogtreecommitdiffstats
path: root/tools/render-test/render-test-main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/render-test/render-test-main.cpp')
-rw-r--r--tools/render-test/render-test-main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp
index 271356cc3..7c65da5e7 100644
--- a/tools/render-test/render-test-main.cpp
+++ b/tools/render-test/render-test-main.cpp
@@ -1264,6 +1264,13 @@ static SlangResult _innerMain(Slang::StdWriters* stdWriters, SlangSession* sessi
StdWritersDebugCallback debugCallback;
debugCallback.writers = stdWriters;
gfxSetDebugCallback(&debugCallback);
+ struct ResetDebugCallbackRAII
+ {
+ ~ResetDebugCallbackRAII()
+ {
+ gfxSetDebugCallback(nullptr);
+ }
+ } resetDebugCallbackRAII;
// Use the profile name set on options if set
input.profile = options.profileName.getLength() ? options.profileName : input.profile;