Fix from He Shuang(shuang.he@intel.com),
XvMCDestroyContext to check pointer valid
This commit is contained in:
parent
915c370964
commit
3147fa775c
|
|
@ -450,11 +450,12 @@ Status XvMCCreateContext(Display *display, XvPortID port,
|
|||
Status XvMCDestroyContext(Display *display, XvMCContext *context)
|
||||
{
|
||||
Status ret;
|
||||
int screen = DefaultScreen(display);
|
||||
int screen;
|
||||
|
||||
if (!display || !context)
|
||||
return XvMCBadContext;
|
||||
|
||||
screen = DefaultScreen(display);
|
||||
ret = (xvmc_driver->destroy_context)(display, context);
|
||||
if (ret) {
|
||||
XVMC_ERR("destroy context fail\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue