Fix mg_image_size() (doesn't need a current canvas anymore)

This commit is contained in:
Martin Fouilleul 2023-05-10 11:18:36 +02:00
parent 1ab1d70df2
commit e426319723
1 changed files with 3 additions and 7 deletions

View File

@ -352,15 +352,11 @@ void mg_surface_render_commands(mg_surface surface,
vec2 mg_image_size(mg_image image) vec2 mg_image_size(mg_image image)
{ {
vec2 res = {0}; vec2 res = {0};
mg_canvas_data* canvas = __mgCurrentCanvas;
if(canvas)
{
mg_image_data* imageData = mg_image_data_from_handle(image); mg_image_data* imageData = mg_image_data_from_handle(image);
if(imageData) if(imageData)
{ {
res = imageData->size; res = imageData->size;
} }
}
return(res); return(res);
} }