Skip to content

Commit

Permalink
Don't call CoTaskMemFree when it isn't available
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Jan 25, 2024
1 parent 9ce037a commit c407203
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ const PathNamePair &GetProcBinary()

namespace {

#if !defined(ALSOFT_UWP) && !defined(_GAMING_XBOX)
struct CoTaskMemDeleter {
void operator()(void *mem) const { CoTaskMemFree(mem); }
};
#endif

void DirectorySearch(const std::string_view path, const char *ext,
std::vector<std::string> *const results)
Expand Down

0 comments on commit c407203

Please sign in to comment.