aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMWindowSheetController.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-04-14 19:30:15 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-04-14 19:30:15 +0000
commite27ef9a94628853e1ab7dd9cf7ac883d96596dda (patch)
tree73d534c29fef865f1ec46793154d016a074ba024 /AppKit/GTMWindowSheetController.m
parent09c3d1d4c6cc035acec7578eeb0ba0bae228fcb0 (diff)
[Author: thakis]
Make implicit assumptions in GTMWindowSheetController explicit by adding asserts. Original review at http://codereview.appspot.com/4418041/ R=avi APPROVED=avi DELTA=8 (6 added, 0 deleted, 2 changed)
Diffstat (limited to 'AppKit/GTMWindowSheetController.m')
-rw-r--r--AppKit/GTMWindowSheetController.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/AppKit/GTMWindowSheetController.m b/AppKit/GTMWindowSheetController.m
index bf85e59..92e2526 100644
--- a/AppKit/GTMWindowSheetController.m
+++ b/AppKit/GTMWindowSheetController.m
@@ -339,6 +339,9 @@ willPositionSheet:(NSWindow*)sheet
}
[invocation invokeWithTarget:systemSheet];
+ _GTMDevAssert(!activeView_ || activeView_ == view,
+ @"You have to call setActiveView:view before "
+ "calling beginSheet:modalForView:view");
activeView_ = view;
}