Browse Source

camera: Delete some failure code that should have been removed before.

Ryan C. Gordon 1 month ago
parent
commit
a88105784f
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/camera/SDL_camera.c

+ 1 - 3
src/camera/SDL_camera.c

@@ -1031,9 +1031,7 @@ bool SDL_PrepareCameraSurfaces(SDL_Camera *device)
             surf = SDL_CreateSurfaceFrom(appspec->width, appspec->height, appspec->format, NULL, 0);
         }
         if (!surf) {
-            ClosePhysicalCamera(device);
-            ReleaseCamera(device);
-            return false;
+            goto failed;
         }
         SDL_SetSurfaceColorspace(surf, devspec->colorspace);