summaryrefslogtreecommitdiff
path: root/src/xvmc/intel_xvmc.c
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2008-08-19 16:27:12 +0800
committerZou Nan hai <nanhai.zou@intel.com>2008-08-19 16:27:12 +0800
commit385dc85881c56e218e7d17d7e1d022568aa29cfb (patch)
tree6b180337626c8d5280a4a182e00f3cee4d53aa89 /src/xvmc/intel_xvmc.c
parent078a59dd48ed00a6512d155883956c18752da9ce (diff)
Fix from He Shuang(shuang.he@intel.com),
XvMCDestroyContext to check pointer valid
Diffstat (limited to 'src/xvmc/intel_xvmc.c')
-rw-r--r--src/xvmc/intel_xvmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index 8fabb35e..ea39069e 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -458,11 +458,11 @@ 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");