iridia/Finch — comment on commit dea9c57f485dbf3293c7b668a76b3581a5bd818c
File:  line 0
By monoceroi:

We are talking about different things. -initWithSample:error: always fails for me in iOS 5.0 Sim with a Core Audio file exported from Audacity that has the wrong endianness. The error object returned from the reporter might always be not null, but then it might get assigned to a dereferenced location. For example, FIFactory always initializes FISound with NULL as the passed error pointer, so if the sound failed to initialize, the code would attempt to lug the error somewhere NULL, which will crash. I no longer have the file around, though, but it is just not very appropriate to dereference something without checking if the pointer is not NULL.

:)

On Nov 12, 2011, at 5:39 PM, Tomáš Znamenáček wrote:

> The error can’t be `NULL` because of magic in the `Reporter` class. But the analyzer complains anyway and I agree that it’s a hack, I’d like to rewrite the sound initialization code completely.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/iridia/Finch/commit/dea9c57f485dbf3293c7b668a76b3581a5bd818c#commitcomment-712821