Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: chrome/browser/extensions/api/messaging/message_service.cc

Issue 787253009: Fix crash when opening native messaging channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_period
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/messaging/message_service.cc
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
index 49d407f530991546644c78902c42666058083222..4f2e84b65bd4e8e7e4d61f13063f91d8e705678b 100644
--- a/chrome/browser/extensions/api/messaging/message_service.cc
+++ b/chrome/browser/extensions/api/messaging/message_service.cc
@@ -424,8 +424,9 @@ void MessageService::OpenChannelToNativeApp(
content::RenderWidgetHost* render_widget_host =
content::RenderWidgetHost::FromID(source_process_id, source_routing_id);
gfx::NativeView native_view =
- render_widget_host ? render_widget_host->GetView()->GetNativeView()
- : nullptr;
+ (render_widget_host && render_widget_host->GetView())
+ ? render_widget_host->GetView()->GetNativeView()
+ : nullptr;
std::string error = kReceivingEndDoesntExistError;
scoped_ptr<NativeMessageHost> native_host = NativeMessageHost::Create(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698