From: Jacek Caban <jacek(a)codeweavers.com> --- dlls/mshtml/editor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index 478c30932c1..e4a16956e46 100644 --- a/dlls/mshtml/editor.c +++ b/dlls/mshtml/editor.c @@ -203,7 +203,10 @@ static nsISelection *get_ns_selection(HTMLDocumentNode *doc) nsISelection *nsselection = NULL; nsresult nsres; - nsres = nsIDOMWindow_GetSelection(doc->outer_window->nswindow, &nsselection); + if(!doc->window) + return NULL; + + nsres = nsIDOMWindow_GetSelection(doc->window->dom_window, &nsselection); if(NS_FAILED(nsres)) ERR("GetSelection failed %08lx\n", nsres); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4444