summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-07 20:41:11 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-07 20:41:11 +0000
commit5fe2718a5268ab261a54d41d1cffa51bdc052932 (patch)
tree6c30bb294b238d32e7ac6dddcb1c2a369dc1bfd3 /chrome
parentdac3679138787c71b16199c22929977dcb37f2b7 (diff)
downloadchromium_src-5fe2718a5268ab261a54d41d1cffa51bdc052932.zip
chromium_src-5fe2718a5268ab261a54d41d1cffa51bdc052932.tar.gz
chromium_src-5fe2718a5268ab261a54d41d1cffa51bdc052932.tar.bz2
Fix a crash seen when trying to paste on linux.
Review URL: http://codereview.chromium.org/63069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13278 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index 2003428..3952e12 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -469,6 +469,9 @@ void RenderWidgetHostViewGtk::RequestSelectionText() {
void RenderWidgetHostViewGtk::ReceivedSelectionText(GtkClipboard* clipboard,
const gchar* text, gpointer userdata) {
+ // If there's nothing to paste (|text| is NULL), do nothing.
+ if (!text)
+ return;
RenderWidgetHostViewGtk* host_view =
reinterpret_cast<RenderWidgetHostViewGtk*>(userdata);
host_view->host_->Send(new ViewMsg_InsertText(host_view->host_->routing_id(),