+ alert = [NSAlert alloc];
+ /*
+ * We may have come here because we ran out of memory, in which
+ * case it's entirely likely that that alloc will fail, so we
+ * should have a fallback of some sort.
+ */
+ if (!alert) {
+ fprintf(stderr, "fatal error (and NSAlert failed): %s\n", errorbuf);
+ } else {
+ alert = [[alert init] autorelease];
+ [alert addButtonWithTitle:@"Oh dear"];
+ [alert setInformativeText:[NSString stringWithCString:errorbuf]];
+ [alert runModal];
+ }