The SetDataStorage function in mitk::BaseRenderer and mitk::BindDispatcherInteractor should check if the new data storage is the same as the actual one and if it is, no action should be performed.
Rationale:
I had a crash because of the current behaviour in our MITK based application when I opened a file. When a new file is added to the data storage, a copy is made of the list of current DataNodeAdd event listeners, and they are notified in a loop. The data manager opens a new editor. In my app there is an extra renderer in a view that is updated from the main editor. So that it is automatically updated, it is added to the same rendering manager as what the main editor has. The mitk::RenderingManager::AddRenderWindow(...) call, however, resets the data storage of the renderer, and even if the data storage is the same (like in my case), this call removes the old listener and adds a new one. The old listener is then destructed.
However, we are still iterating through the data node add event listeners (after the file open), and the copy list of listeners has now an invalid object, and when we reach it, the application crashes.
I hope it makes sense. :)
I will send a PR soon.