mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 03:09:53 +02:00
Fix crash when hovering over a non-existent thumbnail
This commit is contained in:
committed by
Simon Robertshaw
parent
3d82cea94f
commit
5dbb0dc475
@@ -3790,6 +3790,7 @@ void draw_rgba_image(pixel *vid, unsigned char *data, int x, int y, float alpha)
|
|||||||
unsigned char w, h;
|
unsigned char w, h;
|
||||||
int i, j;
|
int i, j;
|
||||||
unsigned char r, g, b, a;
|
unsigned char r, g, b, a;
|
||||||
|
if (!data) return;
|
||||||
w = *(data++)&0xFF;
|
w = *(data++)&0xFF;
|
||||||
h = *(data++)&0xFF;
|
h = *(data++)&0xFF;
|
||||||
for (j=0; j<h; j++)
|
for (j=0; j<h; j++)
|
||||||
@@ -3808,6 +3809,7 @@ void draw_rgba_image(pixel *vid, unsigned char *data, int x, int y, float alpha)
|
|||||||
void draw_image(pixel *vid, pixel *img, int x, int y, int w, int h, int a)
|
void draw_image(pixel *vid, pixel *img, int x, int y, int w, int h, int a)
|
||||||
{
|
{
|
||||||
int i, j, r, g, b;
|
int i, j, r, g, b;
|
||||||
|
if (!img) return;
|
||||||
for (j=0; j<h; j++)
|
for (j=0; j<h; j++)
|
||||||
for (i=0; i<w; i++)
|
for (i=0; i<w; i++)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user