Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit 4d489ce

Browse files
committed
- this is a fix for adobe/brackets#7752
1 parent c5cd588 commit 4d489ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

appshell/client_handler.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,13 @@ void ClientHandler::SendOpenFileCommand(CefRefPtr<CefBrowser> browser, const Cef
353353
std::string fileArrayStr(fileArray);
354354
// FIXME: Use SendJSCommand once it supports parameters
355355
std::string cmd = "require('command/CommandManager').execute('file.openDroppedFiles'," + fileArrayStr + ")";
356-
browser->GetMainFrame()->ExecuteJavaScript(CefString(cmd.c_str()),
356+
357+
// if files are droppend and the Open Dialog is visible, then browser is NULL
358+
// This fixes https://github.com/adobe/brackets/issues/7752
359+
if (browser) {
360+
browser->GetMainFrame()->ExecuteJavaScript(CefString(cmd.c_str()),
357361
browser->GetMainFrame()->GetURL(), 0);
362+
}
358363
}
359364

360365
void ClientHandler::DispatchCloseToNextBrowser()

0 commit comments

Comments
 (0)