Chromium Code Reviews| Index: chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm |
| diff --git a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm |
| index 287a887884725fce8d2a5206c34734bc9d5e6ec9..34c66e2572c61806b57439c2ca2578abe1c9120b 100644 |
| --- a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm |
| +++ b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm |
| @@ -224,7 +224,8 @@ enum AlertAction { |
| JavaScriptAppModalDialogCocoa::JavaScriptAppModalDialogCocoa( |
| app_modal::JavaScriptAppModalDialog* dialog) |
| : dialog_(dialog), |
| - popup_helper_(new AppModalDialogHelper(dialog->web_contents())), |
| + popup_helper_( |
| + new AppModalDialogHelper(dialog ? dialog->web_contents() : NULL)), |
|
Bernhard Bauer
2014/12/22 13:18:35
nullptr
Bernhard Bauer
2014/12/22 13:18:35
Also, instead of doing this `dialog ? dialog->web_
|
| is_showing_(false) { |
| // Determine the names of the dialog buttons based on the flags. "Default" |
| // is the OK button. "Other" is the cancel button. We don't use the |