mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-21 08:30:56 +00:00
* Source/NSImage.m: Throw an exception if you attempt to lock focus on an image with
size (0, 0) * Source/NSCachedImageRep.m: Throw an exception if you attempt to create a cached image rep with a size of (0, 0). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33819 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
741578fb42
commit
192e2d6174
3 changed files with 19 additions and 0 deletions
|
@ -1055,6 +1055,10 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
NSWindow *window;
|
||||
GSRepData *repd;
|
||||
|
||||
if (NSSizesEqual(NSZeroSize, [self size]))
|
||||
[NSException raise: NSImageCacheException
|
||||
format: @"Cannot lock focus on image with size (0, 0)"];
|
||||
|
||||
if (imageRep == nil)
|
||||
imageRep = [self bestRepresentationForDevice: nil];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue