Skip to content
Snippets Groups Projects
Commit 528bb777 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Return before getting scaling buffers.

Found by scan-build
parent d63dd43c
No related branches found
No related tags found
No related merge requests found
Pipeline #7605 passed
......@@ -220,6 +220,9 @@ calc_scaling_factors(int *x, int *y, int winwidth, int winheight, int aspect_wid
struct graphics_buffer *
do_scale(struct rectlist* rect, int fwidth, int fheight)
{
if (rect->rect.width == 0 || rect->rect.height == 0 || fwidth == 0 || fheight == 0)
return NULL;
struct graphics_buffer* ret1 = get_buffer();
struct graphics_buffer* ret2 = get_buffer();
int pointymult = 1;
......@@ -237,9 +240,6 @@ do_scale(struct rectlist* rect, int fwidth, int fheight)
uint32_t* nt;
bool swapxy = false;
if (rect->rect.width == 0 || rect->rect.height == 0 || fwidth == 0 || fheight == 0)
return NULL;
int xscale = fwidth / rect->rect.width;
int yscale = fheight / rect->rect.height;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment