DXGL r658 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r657‎ | r658 | r659 >
Date:18:17, 28 May 2016
Author:admin
Status:new
Tags:
Comment:
Fix a resource leak in dxgltest.exe
Modified paths:
  • /dxgltest/Tests2D.cpp (modified) (history)

Diff [purge]

Index: dxgltest/Tests2D.cpp
@@ -39,7 +39,7 @@
4040 static HWND hWnd;
4141 static int testnum;
4242 static unsigned int randnum;
43 -static int testtypes[] = {0,1,0,1,0,1,2,2,2,1};
 43+static int testtypes[] = {0,1,0,1,0,1,2,0,2,1};
4444 static DWORD counter;
4545
4646 static DDSPRITE sprites[16];
@@ -668,6 +668,7 @@
669669 ddcaps.dwSize = sizeof(DDCAPS);
670670 ddinterface->GetCaps(&ddcaps, NULL);
671671 DrawROPPatterns(ddsrender, sprites, backbuffers, ddver, bpp, ddcaps.dwRops,hWnd,palette);
 672+ if (palette) palette->Release();
672673 break;
673674 case 8:
674675 ddsrender->GetSurfaceDesc(&ddsd);