Authored by shunzi

为masonry添加保护

Pod::Spec.new do |s|
s.name = 'Masonry'
s.version = '1.1.0'
s.version = '1.1.0.yoho'
s.license = 'MIT'
s.summary = 'Harness the power of Auto Layout NSLayoutConstraints with a simplified, chainable and expressive syntax.'
s.homepage = 'https://github.com/cloudkite/Masonry'
... ...
... ... @@ -327,6 +327,12 @@ static char kInstalledConstraintsKey;
if (!self.firstViewAttribute.isSizeAttribute && !self.secondViewAttribute) {
secondLayoutItem = self.firstViewAttribute.view.superview;
secondLayoutAttribute = firstLayoutAttribute;
if (!secondLayoutItem) {
NSAssert(secondLayoutItem, @"YH_Mall : The secondItem is null or nil !!!!!");
return;
}
}
MASLayoutConstraint *layoutConstraint
... ...