mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[OPENGLCFG] Fix crash if no drivers (#1919)
Actually, it crashes here on Windows XP.
This commit is contained in:
parent
c57d4d7b9e
commit
e7b8f27309
1 changed files with 3 additions and 2 deletions
|
@ -190,13 +190,14 @@ INT_PTR CALLBACK GeneralPageProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
{
|
if (pOglDrivers != NULL)
|
||||||
|
{
|
||||||
INT iKey;
|
INT iKey;
|
||||||
for (iKey = 0; iKey <= dwNumDrivers; iKey++)
|
for (iKey = 0; iKey <= dwNumDrivers; iKey++)
|
||||||
HeapFree(GetProcessHeap(), 0, pOglDrivers[iKey]);
|
HeapFree(GetProcessHeap(), 0, pOglDrivers[iKey]);
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, pOglDrivers);
|
HeapFree(GetProcessHeap(), 0, pOglDrivers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue