Commit 6dfa25d0 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

urlmon: Stop binding when OnDataAvailable fails.

parent 5ca254f7
......@@ -1095,8 +1095,19 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
formatetc.tymed = stgmed.tymed;
formatetc.cfFormat = This->clipboard_format;
IBindStatusCallback_OnDataAvailable(This->callback, bscf, progress,
hres = IBindStatusCallback_OnDataAvailable(This->callback, bscf, progress,
&formatetc, &stgmed);
if(hres != S_OK) {
if(This->download_state != END_DOWNLOAD) {
This->download_state = END_DOWNLOAD;
IBindStatusCallback_OnProgress(This->callback, progress, progress_max,
BINDSTATUS_ENDDOWNLOADDATA, This->url);
}
WARN("OnDataAvailable returned %x\n", hres);
stop_binding(This, hres, NULL);
return;
}
if(This->download_state == END_DOWNLOAD)
stop_binding(This, S_OK, NULL);
......
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