Sfoglia il codice sorgente

Haiku: Fixed memory leak if creating framebuffer failed.

Philipp Wiesemann 8 anni fa
parent
commit
4f981df37f
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      src/video/haiku/SDL_bframebuffer.cc

+ 1 - 0
src/video/haiku/SDL_bframebuffer.cc

@@ -76,6 +76,7 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
 			true);	/* Contiguous memory required */
 			
 	if(bitmap->InitCheck() != B_OK) {
+		delete bitmap;
 		return SDL_SetError("Could not initialize back buffer!\n");
 	}