Skip to content

Commit 4c066b3

Browse files
authored
Merge pull request #1083 from PlayEveryWare/fix/nullsafe-threadaffinity
fix: Nullsafe ThreadAffinity
2 parents 696b237 + a1f6e5d commit 4c066b3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/Config/PlatformConfig.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ namespace pew::eos::config
224224
}
225225
else if (name == "threadAffinity")
226226
{
227+
if (value.payload == 0)
228+
{
229+
// A payload of 0 means that threadAffinity should be null
230+
// Don't set it in this case
231+
return;
232+
}
233+
227234
const auto thread_affinity_json_object = *static_cast<json_object_s*>(value.payload);
228235
auto thread_affinity_iterator = thread_affinity_json_object.start;
229236

0 commit comments

Comments
 (0)