aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPUserManagerDelegate.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2013-03-07 01:29:19 +0000
committerrowanbeentje <rowan@beent.je>2013-03-07 01:29:19 +0000
commit2a7c3296a7186558446d136d4c87633126561371 (patch)
tree0466e2d5c60bca04dd8c82eaec1cc70498cc0227 /Source/SPUserManagerDelegate.m
parent1ebe3e3b0c5fc9ea248dfd4a678d3166d5e62c78 (diff)
downloadsequelpro-2a7c3296a7186558446d136d4c87633126561371.tar.gz
sequelpro-2a7c3296a7186558446d136d4c87633126561371.tar.bz2
sequelpro-2a7c3296a7186558446d136d4c87633126561371.zip
- Fix crashes in the User Manager when fields don't validate but a save/cancel/tab switch is still triggered, addressing Issue #1627
Diffstat (limited to 'Source/SPUserManagerDelegate.m')
-rw-r--r--Source/SPUserManagerDelegate.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/SPUserManagerDelegate.m b/Source/SPUserManagerDelegate.m
index c1a96ba9..8fa2b980 100644
--- a/Source/SPUserManagerDelegate.m
+++ b/Source/SPUserManagerDelegate.m
@@ -124,7 +124,11 @@ static NSString *SPSchemaPrivilegesTabIdentifier = @"Schema Privileges";
BOOL retVal = YES;
if ([[treeController selectedObjects] count] == 0) return NO;
-
+
+ if (![treeController commitEditing]) {
+ return NO;
+ }
+
// Currently selected object in tree
id selectedObject = [[treeController selectedObjects] objectAtIndex:0];