From 6a9eaa619c683441054f994bf17c8b6d9ab0c228 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 20 Jan 2022 13:08:28 +1100 Subject: [PATCH] msado15: Return early if Execute doesn't return a rowset. Not all queries return a rowset, eg delete from .... In these cases, there isn't anything else to be done. Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Alexandre Julliard --- dlls/msado15/recordset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 92a0deb6959..23865b37688 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -1531,7 +1531,7 @@ static HRESULT WINAPI recordset_Open( _Recordset *iface, VARIANT source, VARIANT hr = ICommandText_Execute(command_text, NULL, &IID_IUnknown, NULL, &affected, &rowset); ICommandText_Release(command_text); - if (FAILED(hr)) + if (FAILED(hr) || !rowset) return hr; ADORecordsetConstruction_put_Rowset(&recordset->ADORecordsetConstruction_iface, rowset);