C90 compliance
authorAlexandra Ellwood <lxs@mit.edu>
Sat, 27 Sep 2008 00:44:39 +0000 (00:44 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Sat, 27 Sep 2008 00:44:39 +0000 (00:44 +0000)
ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20762 dc483132-0cff-0310-8789-dd5450dbe970

src/kim/agent/mac/PopupButton.m

index e4934a9ebe75e518bb9d1f39385a77ecf6bb222d..d264c041bbe558ef8801291eeaa6f19a03f97e5d 100644 (file)
 - (void) mouseDown: (NSEvent *) event
 {
     if([self isEnabled] && ([self menu] != NULL)) {
+        NSEvent *menuEvent = NULL;
         NSPoint menuPoint = { 3, [self frame].size.height + 1 };
         
         [self highlight: YES];
         
-        NSEvent *menuEvent = [NSEvent mouseEventWithType: [event type]
-                                                location: [self convertPoint: menuPoint toView: NULL]
-                                           modifierFlags: [event modifierFlags]
-                                               timestamp: [event timestamp]
-                                            windowNumber: [[event window] windowNumber]
-                                                 context: [event context]
-                                             eventNumber: [event eventNumber]
-                                              clickCount: [event clickCount]
-                                                pressure: [event pressure]];
+        menuEvent = [NSEvent mouseEventWithType: [event type]
+                                       location: [self convertPoint: menuPoint toView: NULL]
+                                  modifierFlags: [event modifierFlags]
+                                      timestamp: [event timestamp]
+                                   windowNumber: [[event window] windowNumber]
+                                        context: [event context]
+                                    eventNumber: [event eventNumber]
+                                     clickCount: [event clickCount]
+                                       pressure: [event pressure]];
         
         [NSMenu popUpContextMenu: [self menu] withEvent: menuEvent forView: self];