--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -3084,17 +3084,23 @@ HRESULT  WINAPI  IDirect3DDevice8Impl_Se
     case D3DRS_POINTSPRITEENABLE         :
     {
         if(Value) {
+#if defined(GL_ARB_point_sprite)
             if(GL_SUPPORT(GL_ARB_point_sprite)) {
                 glEnable(GL_POINT_SPRITE_ARB);
                 checkGLcall("glEnable GL_POINT_SPRITE_ARB");
-            } else {
+            } else 
+#endif
+            {
                 TRACE("Point sprites cannot be enabled in this version of opengl\n");
             }
         } else {
+#if defined(GL_ARB_point_sprite)
             if(GL_SUPPORT(GL_ARB_point_sprite)) {
                 glDisable(GL_POINT_SPRITE_ARB);
                 checkGLcall("glDisable GL_POINT_SPRITE_ARB");
-            } else {
+            } else 
+#endif
+            {
                 TRACE("Point sprites cannot be disabled in this version of opengl\n");
             }
         }
