diff --git a/ImFileDialog.cpp b/ImFileDialog.cpp index 8523d5b..33e2039 100644 --- a/ImFileDialog.cpp +++ b/ImFileDialog.cpp @@ -588,8 +588,10 @@ namespace ifd { m_treeCache.emplace_back(std::move(quickAccess)); // OneDrive - auto oneDrive = std::make_unique(_wgetenv(L"OneDriveConsumer")); - m_treeCache.emplace_back(std::move(oneDrive)); + if (auto oneDrivePath = _wgetenv(L"OneDrive"); oneDrivePath != nullptr) { + auto oneDrive = std::make_unique(oneDrivePath); + m_treeCache.emplace_back(std::move(oneDrive)); + } // This PC auto thisPC = std::make_unique("This PC");