Multitexture Crashes

I am going to try to make a lightmap plus a detail texture for my terrain engine, and I can not get it to render without crashing. It just loads the window and then crashes with a signal 11 (I think it was 11). Here is my code -