Hello! I have a problem with the function to output an object in SDL.

Here in this code it issues SIGSEGV:

void Window::draw(Object *toDraw) { SDL_RenderCopy(coreRenderer, SDL_CreateTextureFromSurface(getRenderer(), toDraw->getSurface()), NULL, NULL); } 

I think by the names of functions / variables everything is clear, if not, then the whole code HERE

I really hope for you and your help.

  • I also suspect that I have a memory leak, because need to remove toDraw - witaway
  • And what prevents you from going through the code in the debugger and locating the problem? - PinkTux
  • Well, I'm not doing nothing. I'm trying to. However, if it worked, I wouldn’t write stupid questions - witaway

0