[Commits] [wesnoth/wesnoth] 151aa7: Add an assertion check to detect a null pointer ca...
GitHub
noreply at github.com
Wed Nov 19 03:09:12 UTC 2014
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 151aa77d2cbae39ae1c78dd7a6a8913691c511d1
https://github.com/wesnoth/wesnoth/commit/151aa77d2cbae39ae1c78dd7a6a8913691c511d1
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2014-11-19 (Wed, 19 Nov 2014)
Changed paths:
M src/persist_context.cpp
Log Message:
-----------
Add an assertion check to detect a null pointer case
Also preemptively block subsequent dereferences.
Hopefully somebody will eventually hit an assertion failure here and
report back to help me understand how such a situation could possibly
arise, so I can decide whether to remove the assert and leave the new
loop conditional intact or change it to match the intended behavior
(e.g. it's possible `!active || active->empty()` would be preferable in
some scenario).
Spotted by Coverity.
More information about the Commits
mailing list