[Bricksmith] MPD file handling crash

Re: [Bricksmith] MPD file handling crash
Just as a note, in LDView, I use an STL std::map object of strings to bools to track the whole list of parent, grandparent, etc. models while loading. There is the single map for the top-level file that the user loaded. When I enter my submodel loading code, I check to see if the value in that map for the current filename is true. (If there is no value in the map, one is automatically added with a value of false.) If it is true, I bail with "model loop" error. If it isn't, I set it to true, then load the model along with all its sub-models. After loading the model and its submodels, I set the value back to false. The same could be done with an NSDictionary of NSNumbers.
« Next Oldest | Next Newest »

Messages In This Thread
Re: [Bricksmith] MPD file handling crash - by Travis Cobbs - 2011-10-12, 5:20

Forum Jump:

Users browsing this thread: 1 Guest(s)