summaryrefslogtreecommitdiffstats
path: root/tools/gfx/renderer-shared.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/renderer-shared.cpp')
-rw-r--r--tools/gfx/renderer-shared.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp
index cb25079fb..d68ce4ee8 100644
--- a/tools/gfx/renderer-shared.cpp
+++ b/tools/gfx/renderer-shared.cpp
@@ -405,8 +405,13 @@ SlangResult RendererBase::queryInterface(SlangUUID const& uuid, void** outObject
return SLANG_OK;
}
- *outObject = getInterface(uuid);
- return SLANG_OK;
+ if (IDevice* device_ptr = getInterface(uuid))
+ {
+ *outObject = device_ptr;
+ addRef();
+ return SLANG_OK;
+ }
+ return SLANG_E_NO_INTERFACE;
}
IDevice* gfx::RendererBase::getInterface(const Guid& guid)