Hey,
I have the following Problem:
I created a console Application. When I close the console, the App exits normally. But if I close the App with Events (sf::Event::Closed or (Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape) ) , then I get a runtime error...
Unbehandelte Ausnahme bei 0x69764ec0 in SkipBoD.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x01420654.
^^thats the german one...wait...I'll translate it:
Unhandled Exception at 0x69764ec0 in SkipBoD.exe: 0x0000005: Access violation while reading at position 0x01420654.
Anybody knows how to fix this?
while (App.IsOpened())
{
// Clear screen
App.Clear(sf::Color(255,255,255));
App.Draw(sprSfml_logo);
// Draw the string
App.Draw(Text);
App.Display();
sf::Event Event;
while (App.GetEvent(Event))
{
// Window closed
if (Event.Type == sf::Event::Closed)
App.Close();
// Escape key pressed
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape)){
App.Close();
}
}
}