diff options
Diffstat (limited to 'Source/SPFieldMapperController.m')
-rw-r--r-- | Source/SPFieldMapperController.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m index 290040a8..0a51e20f 100644 --- a/Source/SPFieldMapperController.m +++ b/Source/SPFieldMapperController.m @@ -160,6 +160,7 @@ if (fieldMappingGlobalValues) [fieldMappingGlobalValues release]; if (fieldMappingGlobalValuesSQLMarked) [fieldMappingGlobalValuesSQLMarked release]; if (fieldMappingTableDefaultValues) [fieldMappingTableDefaultValues release]; + if (primaryKeyField) [primaryKeyField release]; [super dealloc]; } @@ -356,7 +357,8 @@ [fieldMappingTableDefaultValues addObject:@"0"]; } targetTableHasPrimaryKey = YES; - primaryKeyField = [tableDetails objectForKey:@"primarykeyfield"]; + if (primaryKeyField) [primaryKeyField release]; + primaryKeyField = [[tableDetails objectForKey:@"primarykeyfield"] retain]; } else { if([column objectForKey:@"unique"]) { [type appendFormat:@",%@",@"UNIQUE"]; |