Bug 334295 status is used uninitialized in DocumentViewerImpl::DumpContentToPPM if fopen fails

r=roc sr=roc
This commit is contained in:
timeless%mozdev.org 2006-05-06 21:56:37 +00:00
parent e0725bc241
commit 5aa27b6361

View File

@ -960,7 +960,9 @@ DocumentViewerImpl::DumpContentToPPM(const char* aFileName)
PRUint8* buf = new PRUint8[3*width];
if (buf) {
FILE* f = fopen(aFileName, "wb");
if (f) {
if (!f) {
status = "FOPENFAILED";
} else {
fprintf(f, "P6\n%d\n%d\n255\n", width, height);
for (PRUint32 i = 0; i < height; ++i) {
PRUint8* src = data + i*rowSpan;