nicklockwood / FXBlurView

[DEPRECATED]
Other
4.94k stars 713 forks source link

Prevent crash upon malloc returning NULL #124

Closed jspavlick closed 7 years ago

jspavlick commented 8 years ago

We had a crash in production on line 94 with EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000 I can reproduce this by setting either buffer1.data and/or buffer2.data to NULL (malloc() will naturally return NULL if the system is out of memory)

This fixes said issue.

jspavlick commented 8 years ago

Thank you for an otherwise brilliant library.

jspavlick commented 7 years ago

Hey @nicklockwood I made the changes you requested.

nicklockwood commented 7 years ago

👍