Commit dfd3a2c5 authored by Mohamed Heikal's avatar Mohamed Heikal Committed by Commit Bot

Fix ScreenshotCoordinator trying to install non-existant module

When image_editor DFM is not defined, pressing the edit button should do
nothing rather than crash chrome.

Bug: 1145044
Change-Id: Ideaf738bde7c626bee627648c517f4fe9f3a4910
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517619Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823671}
parent 1b396618
...@@ -140,6 +140,10 @@ public class ScreenshotCoordinator { ...@@ -140,6 +140,10 @@ public class ScreenshotCoordinator {
* @param onSuccess. Runnable to run on success. * @param onSuccess. Runnable to run on success.
*/ */
protected void retryInstallEditor(Runnable onSuccess) { protected void retryInstallEditor(Runnable onSuccess) {
if (mImageEditorModuleProvider == null) {
// If the module does not exist, nothing to do.
return;
}
installEditor(false, onSuccess); installEditor(false, onSuccess);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment