comparison vidix/drivers.c @ 22878:e0749444591f

segfaults if name is NULL
author ben
date Sun, 01 Apr 2007 16:22:14 +0000
parents 030428ba5bb3
children d74001dbe2a6
comparison
equal deleted inserted replaced
22877:9676cce0987a 22878:e0749444591f
96 int vidix_find_driver (VDXContext *ctx, const char *name, 96 int vidix_find_driver (VDXContext *ctx, const char *name,
97 unsigned int cap, int verbose) 97 unsigned int cap, int verbose)
98 { 98 {
99 VDXDriver *drv; 99 VDXDriver *drv;
100 100
101 if (!strcmp (name, "help")) 101 if (name && !strcmp (name, "help"))
102 { 102 {
103 vidix_list_drivers (); 103 vidix_list_drivers ();
104 ctx->drv = NULL; 104 ctx->drv = NULL;
105 return 0; 105 return 0;
106 } 106 }