projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: add storageSamples parameter to renderbuffer functions
[mesa.git]
/
src
/
mesa
/
main
/
debug.c
diff --git
a/src/mesa/main/debug.c
b/src/mesa/main/debug.c
index 7b76a94969871df918ab6723341c2c4353ed9d57..b1fa1f067ff2a14d65e9071edf4b4a7acf361d4b 100644
(file)
--- a/
src/mesa/main/debug.c
+++ b/
src/mesa/main/debug.c
@@
-24,6
+24,7
@@
*/
#include <stdio.h>
*/
#include <stdio.h>
+#include "errors.h"
#include "mtypes.h"
#include "attrib.h"
#include "enums.h"
#include "mtypes.h"
#include "attrib.h"
#include "enums.h"
@@
-235,6
+236,11
@@
write_ppm(const char *filename, const GLubyte *buffer, int width, int height,
fprintf(f,"255\n");
fclose(f);
f = fopen( filename, "ab" ); /* reopen in binary append mode */
fprintf(f,"255\n");
fclose(f);
f = fopen( filename, "ab" ); /* reopen in binary append mode */
+ if (!f) {
+ fprintf(stderr, "Error while reopening %s in write_ppm()\n",
+ filename);
+ return;
+ }
for (y=0; y < height; y++) {
for (x = 0; x < width; x++) {
int yy = invert ? (height - 1 - y) : y;
for (y=0; y < height; y++) {
for (x = 0; x < width; x++) {
int yy = invert ? (height - 1 - y) : y;