discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in gui 0.9.2 (NSImage::size)


From: Andreas Höschler
Subject: Bug in gui 0.9.2 (NSImage::size)
Date: Sat, 29 May 2004 19:36:21 +0200

Hi all,

I found a bug in the latest gui. I get an "Illegal Instruction (core dumped)" in NSImage.m

- (NSSize) size
{
  if (_size.width == 0)
    {
        NSLog(@"size A");
      NSImageRep *rep = [self bestRepresentationForDevice: nil];
        NSLog(@"size B %@", rep);
      _size = [rep size];       // <-- core dumped is raised here
        NSLog(@"size C");
    }
  return _size;
}

-bestRepresentationForDevice returns nil in my case. Then [rep size] is called which is not a good idea. Bummh!!! I haven't looked too much into NSImage yet and whether one should expect bestRepresentationForDevice to return nil. If anybody immediately knows what's wrong here I would be glad for a pointer.

Thanks!

Regards,

   Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]