From 142cee6f5530d1eeb28a67948dbd38a8acc7b85b Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 15 Jun 2011 12:30:13 +0000 Subject: Fix paste in form inputs in iframes. svn path=/trunk/netsurf/; revision=12479 --- desktop/textinput.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'desktop/textinput.c') diff --git a/desktop/textinput.c b/desktop/textinput.c index f114067f0..4f5d771e3 100644 --- a/desktop/textinput.c +++ b/desktop/textinput.c @@ -1329,10 +1329,11 @@ bool browser_window_key_press(struct browser_window *bw, uint32_t key) bool browser_window_paste_text(struct browser_window *bw, const char *utf8, unsigned utf8_len, bool last) { - if (!bw->paste_callback) + if (!bw->focus || !bw->focus->paste_callback) return false; - return bw->paste_callback(bw, utf8, utf8_len, last, bw->caret_p); + return bw->focus->paste_callback(bw->focus, utf8, utf8_len, last, + bw->focus->caret_p); } -- cgit v1.2.3