flattenlistmodel: Fix uninitialized variable warning
Variable, added, would be a garbage value if model is NULL and the following code, if condition, use the uninitialized variable. A side effect could be occurred by that.
To avoid it, assign zero to the variable if model is NULL.