You have a modelCell pointer declared locally to your first bit of code, presumably in the scope of the constructor. If that is the case, then the second bit of code accesses a modelCell pointer than cannot be the same variable: probably declared as a class member but never initialised.
Bookmarks