changeset 3318:a3739b590cf2

do not crash if can't get modelines (dga2.0)
author alex
date Tue, 04 Dec 2001 17:24:25 +0000
parents 614b4525d275
children 66134af21278
files libvo/vo_dga.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_dga.c	Tue Dec 04 15:49:26 2001 +0000
+++ b/libvo/vo_dga.c	Tue Dec 04 17:24:25 2001 +0000
@@ -23,6 +23,9 @@
  * - works only on x86 architectures
  *
  * $Log$
+ * Revision 1.34  2001/12/04 17:24:25  alex
+ * do not crash if can't get modelines (dga2.0)
+ *
  * Revision 1.33  2001/11/06 11:21:08  nick
  * Move yuv2rgb to postprocess
  *
@@ -859,6 +862,15 @@
 // mgraffam@idsi.net
   if (modelines==NULL)
     modelines=XDGAQueryModes(vo_dga_dpy, XDefaultScreen(vo_dga_dpy),&modecount);
+
+  vd_printf(VD_DBG,
+	    "vo_dga: modelines=%p, modecount=%d\n", modelines, modecount);
+
+  if (modelines == NULL)
+  {
+    vd_printf(VD_ERR, "vo_dga: can't get modelines\n");
+    return 1;
+  }
   
   vd_printf(VD_INFO, 
             "vo_dga: DGA 2.0 available :-) Can switch resolution AND depth!\n");