Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gnustep/libs-gui into NSBrowser_b…
Browse files Browse the repository at this point in the history
…indings_branch
  • Loading branch information
gcasa committed Jan 1, 2025
2 parents 1a74cb6 + 3a3a8c4 commit a3ebaf2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Source/NSImageRep.m
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ + (NSArray *) imageRepsWithContentsOfFile: (NSString *)filename
Class rep;
NSData* data;

// Not worth trying to load an empty file
if (nil == filename)
return nil;

// Is the file extension already the file type?
ext = [filename pathExtension];
if (!ext)
Expand Down
2 changes: 1 addition & 1 deletion Tests/gui/NSBezierPath/bounds.m
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ int main(int argc, char **argv)
}

// printf("bounds=%@\n",NSStringFromRect([p bounds]));

DESTROY(p);
DESTROY(arp);

return 0;
Expand Down
1 change: 1 addition & 0 deletions Tests/gui/NSBezierPath/windingCountAtPoint.m
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ int main(int argc, char **argv)
PAUSE
}

DESTROY(p);
DESTROY(arp);

return 0;
Expand Down
3 changes: 3 additions & 0 deletions Tests/gui/NSBitmapImageRep/testcopy.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ int main()
pass([copy1Bitmap bitmapData] != [copy2Bitmap bitmapData],
"Copied bitmaps have a different image data pointer - could cause image data corruption.");

DESTROY(copy1Bitmap);
DESTROY(copy2Bitmap);
DESTROY(origBitmap);
[arp release];
return 0;
}
5 changes: 3 additions & 2 deletions Tests/gui/NSMenuItem/encoding.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ int main()
START_SET("NSMenuItem key equivalent mask")

NSString *mask = @"NSKeyEquivModMask";
NSMenuItem *item = [[NSMenuItem alloc] init];
NSMenuItem *item = AUTORELEASE([[NSMenuItem alloc] init]);
NSMutableData *data = [NSMutableData data];
NSNumber *encodedKeyMask;
NSError *error = nil;
Expand All @@ -23,7 +23,8 @@ int main()

item.keyEquivalentModifierMask = NSShiftKeyMask;

archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data];
archiver = AUTORELEASE(
[[NSKeyedArchiver alloc] initForWritingWithMutableData: data]);

[archiver encodeRootObject: item];
[archiver finishEncoding];
Expand Down
2 changes: 1 addition & 1 deletion Tests/gui/NSView/NSView_visibleRect.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int main(int argc, char **argv)
{
CREATE_AUTORELEASE_POOL(arp);
NSRect f = NSMakeRect(0,0,100,100);
NSView *v = [[NSView alloc] initWithFrame: f];
NSView *v = AUTORELEASE([[NSView alloc] initWithFrame: f]);
int passed = 1;

if (!NSEqualRects([v visibleRect], f))
Expand Down

0 comments on commit a3ebaf2

Please sign in to comment.