io-ico: Add an assertion to clarify potential NULL pointer dereference
At a first read through, it looks like the call to OneLine() could end up dereferencing context->pixbuf when it’s NULL. However, due to a combination of other checks in the caller, OneLine() will only be called after DecodeHeader() has set context->pixbuf to a valid object. Otherwise, if DecodeHeader() bails with an error, the pixbuf will never be dereferenced. Add a comment trying to explain this, and an assertion which backs it up more rigorously. Coverity ID: 1388531 https://bugzilla.gnome.org/show_bug.cgi?id=777374
parent
71e3b4a4
Please register or sign in to comment