Commit e8b9bda5 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

mshtml: Handle memory allocation failure when creating IOleUndoManager.

parent 49bdb815
......@@ -197,6 +197,8 @@ static IOleUndoManager *create_undomgr(void)
{
UndoManager *ret = heap_alloc(sizeof(UndoManager));
if (!ret) return NULL;
ret->IOleUndoManager_iface.lpVtbl = &OleUndoManagerVtbl;
ret->ref = 1;
......@@ -246,6 +248,9 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFG
if(!This->doc_obj->undomgr)
This->doc_obj->undomgr = create_undomgr();
if (!This->doc_obj->undomgr)
return E_OUTOFMEMORY;
return IOleUndoManager_QueryInterface(This->doc_obj->undomgr, riid, ppv);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment