diff options
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate_gtk.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc index 3866e3d..3b0bf82 100644 --- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc +++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc @@ -47,6 +47,10 @@ void SelectionClipboardGetContents(GtkClipboard* clipboard, WebView* webview = static_cast<WebView*>(data); WebFrame* frame = webview->GetFocusedFrame(); + if (!frame) + frame = webview->GetMainFrame(); + DCHECK(frame); + std::string selection = frame->GetSelection(TEXT_HTML == info); if (TEXT_HTML == info) { gtk_selection_data_set(selection_data, |