diff --git a/EasyMapping.podspec b/EasyMapping.podspec index 18f3bb8..fb341e1 100644 --- a/EasyMapping.podspec +++ b/EasyMapping.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "EasyMapping" - s.version = "0.18.0" + s.version = "0.18.1" s.summary = "The easiest way to map data from your webservice." s.homepage = "https://github.com/lucasmedeirosleite/EasyMapping" s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/EasyMapping/EKPropertyHelper.m b/EasyMapping/EKPropertyHelper.m index bbcf337..2214a5a 100644 --- a/EasyMapping/EKPropertyHelper.m +++ b/EasyMapping/EKPropertyHelper.m @@ -177,6 +177,7 @@ +(void)addValue:(id)value onObject:(id)object forKeyPath:(NSString *)keyPath + (id)getValueOfProperty:(EKPropertyMapping *)propertyMapping fromRepresentation:(NSDictionary *)representation ignoreMissingFields:(BOOL)ignoreMissingFields { + if (propertyMapping == nil) return nil; id value = nil; if (propertyMapping.valueBlock) { @@ -196,6 +197,7 @@ +(id)getValueOfManagedProperty:(EKPropertyMapping *)mapping fromRepresentation:(NSDictionary *)representation inContext:(NSManagedObjectContext *)context { + if (mapping == nil) return nil; id value = nil; if (mapping.managedValueBlock) {