softpipe: check if so_target is NULL before accessing it
softpipe: check if so_target is NULL before accessing it

No idea if this is working right but copied straight from llvmpipe.
(Not only does this check the so_target but also use buffer->data instead
of buffer for the mapping.)
Just trying to get rid of a segfault testing something else...

Reviewed-by: Jose Fonseca <61b5a29db2c0650f7c8510f93eece059c1b09320@vmware.com>
Reviewed-by: Zack Rusin <6ab0df0692bc027e828ec9e4e9fbe8fa1a7842a8@vmware.com>

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