handyJson引起的crash

var nominalTypeDescriptor: NominalTypeDescriptor? {
        let pointer = UnsafePointer(self.pointer)
        let base = pointer.advanced(by: nominalTypeDescriptorOffsetLocation)
        if base.pointee == 0 {
            // swift class created dynamically in objc-runtime didn't have valid nominalTypeDescriptor
            return nil
        }
        return NominalTypeDescriptor(pointer: relativePointer(base: base, offset: base.pointee-base.hashValue))
    }
将offset:pointee    修改为将offset:base.pointee-base.hashValue

你可能感兴趣的:(handyJson引起的crash)