ソースを参照

GPU Metal: Set texture to NULL even if AcquireSwapchainTexture fails

cosmonaut 1 年間 前
コミット
de40d6bae0
1 ファイル変更2 行追加0 行削除
  1. 2 0
      src/gpu/metal/SDL_gpu_metal.m

+ 2 - 0
src/gpu/metal/SDL_gpu_metal.m

@@ -3598,6 +3598,8 @@ static bool METAL_AcquireSwapchainTexture(
         MetalWindowData *windowData;
         CGSize drawableSize;
 
+        *texture = NULL;
+
         windowData = METAL_INTERNAL_FetchWindowData(window);
         if (windowData == NULL) {
             SET_STRING_ERROR_AND_RETURN("Window is not claimed by this SDL_GpuDevice", false);