Commit 1f253df8 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.
parent 47369283
...@@ -184,7 +184,10 @@ static int Open(vlc_object_t *object) ...@@ -184,7 +184,10 @@ static int Open(vlc_object_t *object)
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
Close(VLC_OBJECT(vd)); Direct3DClose(vd);
CommonClean(vd);
Direct3DDestroy(vd);
free(vd->sys);
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -236,7 +236,11 @@ static int Open(vlc_object_t *object) ...@@ -236,7 +236,11 @@ static int Open(vlc_object_t *object)
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
Close(VLC_OBJECT(vd)); DirectXClose(vd);
CommonClean(vd);
if (sys->hddraw_dll)
FreeLibrary(sys->hddraw_dll);
free(sys);
return VLC_EGENERIC; 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