diff --git a/Pod/Classes/ImageHelpers/UIImage+Tinting.swift b/Pod/Classes/ImageHelpers/UIImage+Tinting.swift index 703ab3c..a1abfee 100644 --- a/Pod/Classes/ImageHelpers/UIImage+Tinting.swift +++ b/Pod/Classes/ImageHelpers/UIImage+Tinting.swift @@ -29,7 +29,9 @@ public extension UIImage { let originalAlignmentRectInsets = alignmentRectInsets UIGraphicsBeginImageContextWithOptions(size, false, scale) - let context = UIGraphicsGetCurrentContext()! + guard let context = UIGraphicsGetCurrentContext() else { + return self + } // Flip the context vertically context.translateBy(x: 0.0, y: size.height) @@ -45,7 +47,9 @@ public extension UIImage { context.fill(imageRect) // Get new image - var image = UIGraphicsGetImageFromCurrentImageContext()! + guard var image = UIGraphicsGetImageFromCurrentImageContext() else { + return self + } UIGraphicsEndImageContext() // Prevent further tinting diff --git a/README.md b/README.md index 99576e5..dcac2a1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Swift 4.2](https://img.shields.io/badge/Swift-4.2-orange.svg?style=flat)](https://swift.org) -[![CircleCI](https://img.shields.io/circleci/project/github/Raizlabs/Swiftilities.svg)](https://circleci.com/gh/Raizlabs/Swiftilities/tree/develop) +[![CircleCI](https://img.shields.io/circleci/project/github/Rightpoint/Swiftilities.svg)](https://circleci.com/gh/Rightpoint/Swiftilities/tree/master) [![Version](https://img.shields.io/cocoapods/v/Swiftilities.svg?style=flat)](https://cocoapods.org/pods/Swiftilities) [![License](https://img.shields.io/cocoapods/l/Swiftilities.svg?style=flat)](https://cocoapods.org/pods/Swiftilities) [![Platform](https://img.shields.io/cocoapods/p/Swiftilities.svg?style=flat)](https://cocoapods.org/pods/Swiftilities) diff --git a/Swiftilities.podspec b/Swiftilities.podspec index 0512392..616af63 100644 --- a/Swiftilities.podspec +++ b/Swiftilities.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Swiftilities" - s.version = "0.22.0" + s.version = "0.22.1" s.summary = "A collection of useful Swift utilities." s.swift_version = '4.2'