The change introduced in rBa250be980a13d487099873bb5edf9c797b701ca1 causes a crash when rendering an image or animation with the workbench engine as reported in T75902. The cause is that v3d is only set when using viewport rendering, but not when rendering a still image. When v3d is NULL this resulted in a crash due to null pointer dereferencing in the CULL_BACKFACE_ENABLED macro.
The proposed fix is to use wpd when v3d is NULL.