mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Updating to version 0.20.2
Many bug fixes.
This commit is contained in:
@@ -109,12 +109,10 @@ RLoadJPEG(RContext *context, char *file_name, int index)
|
||||
|
||||
file = fopen(file_name, "r");
|
||||
if (!file) {
|
||||
sprintf(RErrorString, "could not open JPEG file \"%s\"", file_name);
|
||||
RErrorCode = RERR_OPEN;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RErrorString[0] = 0;
|
||||
|
||||
cinfo.err = jpeg_std_error(&jerr.pub);
|
||||
jerr.pub.error_exit = my_error_exit;
|
||||
/* Establish the setjmp return context for my_error_exit to use. */
|
||||
@@ -135,13 +133,13 @@ RLoadJPEG(RContext *context, char *file_name, int index)
|
||||
|
||||
buffer[0] = (JSAMPROW)malloc(cinfo.image_width*cinfo.num_components);
|
||||
if (!buffer[0]) {
|
||||
sprintf(RErrorString, "out of memory");
|
||||
RErrorCode = RERR_NOMEMORY;
|
||||
goto bye;
|
||||
}
|
||||
|
||||
image = RCreateImage(cinfo.image_width, cinfo.image_height, False);
|
||||
if (!image) {
|
||||
sprintf(RErrorString, "out of memory");
|
||||
RErrorCode = RERR_NOMEMORY;
|
||||
goto bye;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user