Ensure we pass valid gw to gadget click gui call.

Only root bw has a gw, so this would have been broken when it
happened in a frameset.
This commit is contained in:
Michael Drake 2014-10-24 20:18:57 +01:00
parent b27f3e5ac4
commit 69e82a8966

View File

@ -1612,7 +1612,9 @@ static nserror browser_window_callback(hlcache_handle *c,
case CONTENT_MSG_GADGETCLICK:
if (event->data.gadget_click.gadget->type == GADGET_FILE) {
guit->window->file_gadget_open(bw->window, c,
struct browser_window *root =
browser_window_get_root(bw);
guit->window->file_gadget_open(root->window, c,
event->data.gadget_click.gadget);
}