diff --git macosx/tkMacOSXXStubs.c macosx/tkMacOSXXStubs.c
index 9a317b6372..e0a2762974 100644
--- macosx/tkMacOSXXStubs.c
+++ macosx/tkMacOSXXStubs.c
@@ -191,16 +191,16 @@ TkpOpenDisplay(
     static NSRect maxBounds = {{0, 0}, {0, 0}};
     static char vendor[25] = "";
     NSArray *cgVers;
-    NSAutoreleasePool *pool = [NSAutoreleasePool new];
 
     if (gMacDisplay != NULL) {
 	if (strcmp(gMacDisplay->display->display_name, display_name) == 0) {
 	    return gMacDisplay;
 	} else {
 	    return NULL;
 	}
     }
 
+    NSAutoreleasePool *pool = [NSAutoreleasePool new];
     display = (Display *)ckalloc(sizeof(Display));
     screen = (Screen *)ckalloc(sizeof(Screen));
     bzero(display, sizeof(Display));
