summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldo Bastian <waldo.bastian@intel.com>2007-11-10 17:52:43 -0800
committerWaldo Bastian <waldo.bastian@intel.com>2007-11-10 17:52:43 -0800
commit7fbb1e8a56ed60cb0ec4455e52469fee6c6fb1d5 (patch)
treeee2c91bc528e71e4fc09889913e7b4046700d63c
parent5811e6a2aee23addb3d949891497b49c28a2161f (diff)
downloadlibva-7fbb1e8a56ed60cb0ec4455e52469fee6c6fb1d5.tar.gz
Generate proper error for NULL display.
-rw-r--r--src/va.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/va.c b/src/va.c
index 8b9b73b..9ff365a 100644
--- a/src/va.c
+++ b/src/va.c
@@ -72,6 +72,11 @@ VADisplay vaGetDisplay (
VADisplay dpy = NULL;
VADriverContextP ctx = pDriverContexts;
+ if (!native_dpy)
+ {
+ return NULL;
+ }
+
while (ctx)
{
if (ctx->x11_dpy == (Display *)native_dpy)