Explorar o código

Fixed double-free of the window shape path

Sam Lantinga %!s(int64=12) %!d(string=hai) anos
pai
achega
a3bb007ee5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/video/cocoa/SDL_cocoashape.m

+ 1 - 1
src/video/cocoa/SDL_cocoashape.m

@@ -92,7 +92,7 @@ Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShape
 
     pool = [[NSAutoreleasePool alloc] init];
     closure.view = [windata->nswindow contentView];
-    closure.path = [[NSBezierPath bezierPath] autorelease];
+    closure.path = [[NSBezierPath bezierPath] init];
     closure.window = shaper->window;
     SDL_TraverseShapeTree(data->shape,&ConvertRects,&closure);
     [closure.path addClip];