mirror of https://github.com/snes9xgit/snes9x.git
Check for NULL Display.
This commit is contained in:
parent
798aa86a45
commit
2de55719de
|
@ -887,6 +887,9 @@ S9xOpenGLDisplayDriver::query_availability (void)
|
||||||
int errorBase, eventBase;
|
int errorBase, eventBase;
|
||||||
Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||||
|
|
||||||
|
if (!display)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (glXQueryExtension (display, &errorBase, &eventBase) == False)
|
if (glXQueryExtension (display, &errorBase, &eventBase) == False)
|
||||||
{
|
{
|
||||||
if (gui_config->hw_accel == HWA_OPENGL)
|
if (gui_config->hw_accel == HWA_OPENGL)
|
||||||
|
|
|
@ -615,6 +615,9 @@ S9xXVDisplayDriver::query_availability (void)
|
||||||
p_error_base;
|
p_error_base;
|
||||||
Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||||
|
|
||||||
|
if (!display)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* Test if XV and SHM are feasible */
|
/* Test if XV and SHM are feasible */
|
||||||
if (!XShmQueryExtension (display))
|
if (!XShmQueryExtension (display))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue