From a13ef050996c2792ff3c16b6424d3a6336e56a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9tur=20Darri=20P=C3=A9tursson?= <11541598+PeturDarri@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:24:37 +0000 Subject: [PATCH] Fixed incorrect condition in Session::queryInterface. (#5978) An AND operator was used where an OR should have been used. --- source/slang/slang.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 9d8e3a68bb..38988ca466 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -608,7 +608,7 @@ Session::queryInterface(SlangUUID const& uuid, void** outObject) return SLANG_OK; } - if (uuid == ISlangUnknown::getTypeGuid() && uuid == IGlobalSession::getTypeGuid()) + if (uuid == ISlangUnknown::getTypeGuid() || uuid == IGlobalSession::getTypeGuid()) { addReference(); *outObject = static_cast(this);