* Headers/AppKit/NSGraphics.h: NSBeep() - Don't crash when a

graphics context isn't available (eg - from a subthread).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30226 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Jonathan Gillaspie 2010-04-23 17:23:43 +00:00
parent e400ed9975
commit e03690b917
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2010-04-23 Jonathan Gillaspie <jonathan.gillaspie@testplant.com>
* Headers/AppKit/NSGraphics.h: NSBeep() - Don't crash when a
graphics context isn't available (eg - from a subthread).
2010-04-23 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSAlert.m (NSRunAlertPanel): Fix incorrect return code

View file

@ -180,8 +180,10 @@ static inline void
NSBeep(void)
{
NSGraphicsContext *ctxt = GSCurrentContext();
(ctxt->methods->NSBeep)
(ctxt, @selector(NSBeep));
if (ctxt != nil) {
(ctxt->methods->NSBeep)
(ctxt, @selector(NSBeep));
}
}
static inline void