DXGL r86 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r85‎ | r86 | r87 >
Date:01:03, 24 January 2012
Author:admin
Status:new
Tags:
Comment:
Fix GetAvailableVidMem - check if pointers are null
Modified paths:
  • /ddraw/glDirectDraw.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirectDraw.cpp
@@ -1787,8 +1787,8 @@
17881788 MEMORYSTATUS memstatus;
17891789 memstatus.dwLength = sizeof(MEMORYSTATUS);
17901790 GlobalMemoryStatus(&memstatus);
1791 - *lpdwTotal = memstatus.dwTotalVirtual;
1792 - *lpdwFree = memstatus.dwAvailVirtual;
 1791+ if(lpdwTotal) *lpdwTotal = memstatus.dwTotalVirtual;
 1792+ if(lpdwFree) *lpdwFree = memstatus.dwAvailVirtual;
17931793 return DD_OK;
17941794 }
17951795 // DDRAW4 wrapper