redbear / Duo

Resources for the RedBear Duo IoT development board.
http://redbear.cc/duo
228 stars 107 forks source link

Fix crashes during BLE and Wifi provisioning #44

Open Danappelxx opened 6 years ago

Danappelxx commented 6 years ago

As @saamerm noted in #35 the iOS app crashes when unwrapping nil alert actions. I believe that this is due to allocating directly into a weak reference, leading to an initial reference count of zero and immediate deallocation. This PR addresses that.

saamerm commented 6 years ago

What made you wanna fix it?

Danappelxx commented 6 years ago

I ran into the same issue when provisioning my duo and had to resort to the serial terminal method which was a pain. After I looked at your comment I realized it was a simple fix so I went ahead and submitted it :)

Danappelxx commented 6 years ago

Wow, BLE provisioning has the same exact bug... can't believe this hasn't been fixed yet! I'll make another commit.