Unusual std::map runtime error
I'm hacking together an editor for a game I'm working on and as part of that editor, I need to have textures, obviously. I've created a std::map variable as so, std::map<std::string, unsigned int> textures; In my image loading code, I have the following snippet. unsigned int id; glGenTextures(1, &id); glBindTexture(GL_TEXTURE_2D, id); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, imageWidth, imageHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, imageData); glBindTexture(GL_TEXTURE