Bugfix: Don’t free xinerama-reply if it is NULL, implement FREE()-macro (Thanks Igor)
This commit is contained in:
@ -24,6 +24,13 @@
|
||||
#define FOR_TABLE(workspace) \
|
||||
for (int cols = 0; cols < workspace->cols; cols++) \
|
||||
for (int rows = 0; rows < workspace->rows; rows++)
|
||||
#define FREE(pointer) do { \
|
||||
if (pointer == NULL) { \
|
||||
free(pointer); \
|
||||
pointer = NULL; \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* ##__VA_ARGS__ means: leave out __VA_ARGS__ completely if it is empty, that is,
|
||||
delete the preceding comma */
|
||||
|
Reference in New Issue
Block a user