This commit fixes crashes during software rendering. http://cgit.freedesktop.org/mesa/mesa/commit/?id=d082c5324914212f76e45be497229c7a0681f706