Skip to content

Commit

Permalink
Fix deadlock when drawing a line
Browse files Browse the repository at this point in the history
  • Loading branch information
RossAdrian committed Jul 30, 2024
1 parent f37ccf0 commit 2774517
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions native/paint.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ void __APISTATUS_internal pyfb_sdrawLine(uint8_t fbnum,
return;
}

struct pyfb_videomode_info vinfo;
pyfb_vinfo(fbnum, &vinfo);

// Ok, then lock
pyfb_fblock(fbnum);

Expand All @@ -96,9 +99,6 @@ void __APISTATUS_internal pyfb_sdrawLine(uint8_t fbnum,
}

// check if all values are valid
struct pyfb_videomode_info vinfo;
pyfb_vinfo(fbnum, &vinfo);

unsigned long int xres = vinfo.vinfo.xres;
unsigned long int yres = vinfo.vinfo.yres;

Expand Down

0 comments on commit 2774517

Please sign in to comment.