This happens randomly. After a few scene changes, UIGraphicsGetCurrentContext returns nil. <img width="1065" alt="screen shot 2018-06-11 at 10 33 17 pm" src="https://user-images.githubusercontent.com/2116191/41238056-a5a333aa-6dc7-11e8-9f02-2854ac21cf6f.png">