Skip to content

Commit 36e3884

Browse files
committed
Guard against possible missing cloud filter export
It's possible that a legacy version of `cldapi.dll` is present on older systems where it's not officially supported, which may have a different set of exports. Guard against this by explicitly checking if the export we desire is present.
1 parent b81b60e commit 36e3884

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ui_api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,12 +681,12 @@ struct CloudProviderLibrary {
681681
FreeLibrary(cldLib);
682682
}
683683

684-
bool Loaded() const { return cldLib != nullptr; }
684+
bool Loaded() const { return cldLib != nullptr && CfGetSyncRootInfoByPath != nullptr; }
685685

686686
CloudProviderLibrary(CloudProviderLibrary const&) = delete;
687687
CloudProviderLibrary& operator = (CloudProviderLibrary const&) = delete;
688688

689-
decltype (&::CfGetSyncRootInfoByPath) CfGetSyncRootInfoByPath;
689+
decltype (&::CfGetSyncRootInfoByPath) CfGetSyncRootInfoByPath{};
690690

691691
HMODULE cldLib{};
692692
};

0 commit comments

Comments
 (0)