mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-01 05:46:06 -04:00
--Bug fixes
-Stop rendering process when a single render or save fails.
This commit is contained in:
@ -116,7 +116,8 @@ static bool WriteJpeg(const char* filename, unsigned char* image, size_t width,
|
||||
jpeg_destroy_compress(&info);
|
||||
|
||||
if (file != nullptr)
|
||||
fclose(file);
|
||||
if (fclose(file))//Non-zero indicates failure.
|
||||
return false;
|
||||
|
||||
b = true;
|
||||
}
|
||||
@ -225,7 +226,8 @@ static bool WritePng(const char* filename, unsigned char* image, size_t width, s
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
|
||||
if (file != nullptr)
|
||||
fclose(file);
|
||||
if (fclose(file))
|
||||
return false;
|
||||
|
||||
b = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user