i915: add a missing NULL pointer check
i915: add a missing NULL pointer check

mesaVisual can be NULL with configless context since this commit:

    commit 551d459af421a2eb937e9e16301bb64da4624f89
    Author: Neil Roberts <neil@linux.intel.com>
    Date:   Fri Mar 7 18:05:47 2014 +0000

    Add the EGL_MESA_configless_context extension
...
    Previously the i965 and i915 drivers were explicitly creating a zeroed visual
    whenever 0 is passed for the EGLConfig.

We attempt to dereference the visual in i915 and now we don't create a
zeroed-out one one it crashes, breaking at least weston in an i915. There's
no point in doing so as it would be zero anyway.

v2: Fixed a typo in commit message.  Added some tags.

Signed-off-by: Lubomir Rintel <c9b9bbc6e9b0bc7e9cec5af1551c7b98adb9530c@v3.sk>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1100967
Cc: "10.2" <59f39c0db42d4479a46b02d4d2bc11120e37bb44@lists.freedesktop.org>
Reviewed-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>

zeux/glsl-optimizer,zz85/glsl-optimizer,zz85/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,metora/MesaGLSLCompiler,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,metora/MesaGLSLCompiler,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,wolf96/glsl-optimizer