Either the pointer to the vector is invalid or the pointers in the vector are invalid; probably the former in this case. This happens in many situations, such as using pointers to local objects which have since been destroyed.
(Aside: Given that you included a semicolon for window, I bet this is a data member rather than a parameter.)
Instead of storing a vector pointer in App, store a vector itself. Instead of storing pointers to Window objects, store the Window objects themself.
struct App {
vector<Window> windows;
};
However, this requires Windows to be Copyable, and they probably aren't. It also disallows storing objects of types derived from Window. Instead, you can use a boost::ptr_vector, which "owns" the pointed-to objects and will delete them when they are erased (such as when the ptr_vector is destroyed or cleared):
struct App {
boost::ptr_vector<Window> windows;
App() {
// just an example
windows.push_back(new Window());
windows.push_back(new DerivedFromWindow());
}
};