UtilityBelt icon indicating copy to clipboard operation
UtilityBelt copied to clipboard

"Image (URL) to Layer Pattern Fill” needs error checking

Open frankko opened this issue 9 years ago • 1 comments

Entering a URL for something that can’t be converted to an NSImage will crash Sketch. Not good.

frankko avatar Apr 21 '15 15:04 frankko

I think the way you’re supposed to do it is checking to see if

var img = [[NSImage alloc] initWithData:imageData]

returns false. But that line crashes Sketch when imageData isn’t actually image data.

frankko avatar Apr 21 '15 18:04 frankko