Skip to content

Commit f06b27b

Browse files
authored
Fix getter methods (#9450)
1 parent ef53ce8 commit f06b27b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

filament/backend/src/Platform.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ void Platform::setBlobFunc(InsertBlobFunc&& insertBlob, RetrieveBlobFunc&& retri
146146

147147
bool Platform::hasInsertBlobFunc() const noexcept {
148148
std::lock_guard<decltype(mMutex)> lock(mMutex);
149-
return bool(mInsertBlob);
149+
return mInsertBlob && bool(*mInsertBlob);
150150
}
151151

152152
bool Platform::hasRetrieveBlobFunc() const noexcept {
153153
std::lock_guard<decltype(mMutex)> lock(mMutex);
154-
return bool(mRetrieveBlob);
154+
return mRetrieveBlob && bool(*mRetrieveBlob);
155155
}
156156

157157
void Platform::insertBlob(void const* key, size_t keySize, void const* value, size_t valueSize) {
@@ -184,7 +184,7 @@ void Platform::setDebugUpdateStatFunc(DebugUpdateStatFunc&& debugUpdateStat) noe
184184

185185
bool Platform::hasDebugUpdateStatFunc() const noexcept {
186186
std::lock_guard<decltype(mMutex)> lock(mMutex);
187-
return mDebugUpdateStat != nullptr;
187+
return mDebugUpdateStat && bool(*mDebugUpdateStat);
188188
}
189189

190190
void Platform::debugUpdateStat(const char* key, uint64_t intValue) {

0 commit comments

Comments
 (0)