mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-28 05:06:42 +00:00
Fix linux build and a crash. hrm, how did it work before...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@146 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f46c64c02f
commit
ac366022f4
8 changed files with 16 additions and 9 deletions
|
@ -99,13 +99,14 @@ struct RECT
|
|||
#endif
|
||||
|
||||
// several macros
|
||||
// PLEASE DO NOT USE THE FOLLOWING SAFE*
|
||||
// They only encourage sloppy coding, and hides bugs.
|
||||
#ifndef SAFE_DELETE_ARRAY
|
||||
#define SAFE_DELETE_ARRAY(x) if( (x) != NULL ) { delete[] (x); (x) = NULL; }
|
||||
#endif
|
||||
#ifndef SAFE_RELEASE
|
||||
#define SAFE_RELEASE(x) if( (x) != NULL ) { (x)->Release(); (x) = NULL; }
|
||||
#endif
|
||||
|
||||
#define SAFE_RELEASE_CGPROG(x) { if( (x) != NULL ) { cgDestroyProgram(x); x = NULL; } }
|
||||
#define SAFE_RELEASE_PROG(x) { if( (x) != 0 ) { glDeleteProgramsARB(1, &(x)); x = 0; } }
|
||||
#define SAFE_RELEASE_TEX(x) { if( (x) != 0 ) { glDeleteTextures(1, &(x)); x = 0; } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue