Commit 0b706f50 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

MSW: fix assertion failure on Open() error paths (fix #3889)

Do not try to delete a callback and/or a mutex that do not exist.
The goto error paths still look a bit suspicious, someone should
double check them.
(cherry picked from commit 1f253df8acc7f2c249c1aae2ba44cae2020a45f7)
parent 34a2451d
......@@ -181,7 +181,10 @@ static int Open(vlc_object_t *object)
return VLC_SUCCESS;
error:
Close(VLC_OBJECT(vd));
Direct3DClose(vd);
CommonClean(vd);
Direct3DDestroy(vd);
free(vd->sys);
return VLC_EGENERIC;
}
......
......@@ -235,7 +235,11 @@ static int Open(vlc_object_t *object)
return VLC_SUCCESS;
error:
Close(VLC_OBJECT(vd));
DirectXClose(vd);
CommonClean(vd);
if (sys->hddraw_dll)
FreeLibrary(sys->hddraw_dll);
free(sys);
return VLC_EGENERIC;
}
......
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