Windows: Fix dialog loading for component build (issue #1617)

This commit is contained in:
Marshall Greenblatt 2017-07-24 12:14:27 -04:00
parent 85c945bc00
commit 6da2bbf229
1 changed files with 3 additions and 1 deletions

View File

@ -121,8 +121,10 @@ void CefJavaScriptDialogRunnerWin::Run(
HMODULE hModule = NULL;
// Try to load the dialog from the DLL.
if (PathService::Get(base::FILE_MODULE, &file_path))
if (PathService::Get(base::DIR_MODULE, &file_path)) {
file_path = file_path.Append(L"libcef.dll");
hModule = ::GetModuleHandle(file_path.value().c_str());
}
if (!hModule)
hModule = ::GetModuleHandle(NULL);
DCHECK(hModule);