This function works fine, or so the compiler / debugger tells me
void GUIManager::init(ToScreen* tS) { toScreen = tS; loadFonts(); GUI_Surface = SDL_SetVideoMode( toScreen->width, toScreen->height, 32, SDL_SWSURFACE ); components.push_back(&PlainText("Hello, World!", font, -20, -40)); }
Here, the first function call causes an access violation error. The debugger does not show any problems. I do not get the opportunity to debug components [0], because the program stops here.
void GUIManager::draw() {
If necessary, these are my "components"
boost::ptr_vector<GUIComponent> components;
Just let me know if any other code is needed. Possibly from PlainText or GUIComponent
source share