From: Paulius Dilkas Subject: [1/2] mshtml: prevents a possible crash Message-Id: Date: Thu, 2 Apr 2015 16:54:21 +0300 Fixes one of the crashes caused by https://bugs.winehq.org/show_bug.cgi?id=34808 --- dlls/mshtml/htmlstyle.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 33318ff..5c43c85 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -484,6 +484,11 @@ static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, stylei nsAString str_name; nsresult nsres; + if(!nsstyle) { + WARN("called with a null style declaration\n"); + return E_INVALIDARG; + } + nsAString_InitDepend(&str_name, style_tbl[sid].name); nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value);