Index: chrome/browser/ui/webui/constrained_html_ui.cc |
diff --git a/chrome/browser/ui/webui/constrained_html_ui.cc b/chrome/browser/ui/webui/constrained_html_ui.cc |
index caf05bc39214c3c208300529f69441d3ca218aac..220fdfe5250374426815de456c6d9992b784a18d 100644 |
--- a/chrome/browser/ui/webui/constrained_html_ui.cc |
+++ b/chrome/browser/ui/webui/constrained_html_ui.cc |
@@ -49,7 +49,7 @@ void ConstrainedHtmlUI::OnDialogCloseMessage(const ListValue* args) { |
return; |
std::string json_retval; |
- if (!args->GetString(0, &json_retval)) |
+ if (!args->empty() && !args->GetString(0, &json_retval)) |
NOTREACHED() << "Could not read JSON argument"; |
delegate->GetHtmlDialogUIDelegate()->OnDialogClosed(json_retval); |
delegate->OnDialogCloseFromWebUI(); |