Skip to content

Commit

Permalink
Fixed incorrect condition in Session::queryInterface. (shader-slang#5978
Browse files Browse the repository at this point in the history
)

An AND operator was used where an OR should have been used.
  • Loading branch information
PeturDarri authored Jan 1, 2025
1 parent f3b916e commit a13ef05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/slang/slang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<slang::IGlobalSession*>(this);
Expand Down

0 comments on commit a13ef05

Please sign in to comment.