Original Post
I'm working on a SDL+GL project and I encountered a following error and I can't figure out what's the problem. Code: Uint8* key = NULL; key = SDL_GetKeyState(NULL); // Error occures here if (key[SDLK_0]) // handle key ... and throws a following error *** glibc detected *** /home/arppa/projs/debrislinux/bin/Debug/debrislinux: munmap_chunk(): invalid pointer: 0x0816cdf8 *** + backtrace + memory map i'm using sdl version 1.2.12 Has someone seen this error before and knows what's wrong. I'm pretty sure it's not the code becouse it runs fine on windows. Thanks in advance.