Generate proper error for NULL display. 15/315/1
authorWaldo Bastian <waldo.bastian@intel.com>
Sun, 11 Nov 2007 01:52:43 +0000 (17:52 -0800)
committerWaldo Bastian <waldo.bastian@intel.com>
Sun, 11 Nov 2007 01:52:43 +0000 (17:52 -0800)
src/va.c

index 8b9b73b..9ff365a 100644 (file)
--- 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)