Fix realloc mistake for DrawImage
This commit is contained in:
1 parent
15b6fb04b9
commit
286aff8a81
1 file changed
+4
@@ -281,6 +281,10 @@ DrawImage(char *buf, int redraw)
|
||||
maxImage = n + 1;
|
||||
imageBuf = (W3MImage *) realloc((void *)imageBuf,
|
||||
sizeof(W3MImage) * maxImage);
|
||||
if (imageBuf == NULL) {
|
||||
fprintf(stderr, "Out of memory\n");
|
||||
exit(1);
|
||||
}
|
||||
for (; i < maxImage; i++)
|
||||
imageBuf[i].pixmap = NULL;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user