Re: [PATCH 06 of 16] ctx might be null. Check it earlier
Hi,
* Erik Hovland wrote:
# HG changeset patch
# User Erik Hovland <erik@xxxxxxxxxxx>
# Date 1236891080 25200
# Branch HEAD
# Node ID 43c02f38d2127c88da18495a6c9c7c1bf5e007a7
# Parent d56f727afd7dcb5f95d4d82fa262699c707d8844
ctx might be null. Check it earlier.
ctx cannot be NULL I think because mutt_set_flag needs to work on
messages from an open folder. The check might imply that it can be NULL,
but that wouldn't make much sense and should be considered a bug.
I think the fix from using 'ctx' variable rather than Context in:
http://dev.mutt.org/hg/mutt/rev/3279
is just overly eager. Furthermore, there're tons of other calls using
ctx without prior checking and that never caused trouble so I think it's
enough to remove the check for ctx to silence analytic tools' warnings.
Rocco