Skip to content

Commit 2774517

Browse files
committed
Fix deadlock when drawing a line
1 parent f37ccf0 commit 2774517

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

native/paint.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ void __APISTATUS_internal pyfb_sdrawLine(uint8_t fbnum,
8484
return;
8585
}
8686

87+
struct pyfb_videomode_info vinfo;
88+
pyfb_vinfo(fbnum, &vinfo);
89+
8790
// Ok, then lock
8891
pyfb_fblock(fbnum);
8992

@@ -96,9 +99,6 @@ void __APISTATUS_internal pyfb_sdrawLine(uint8_t fbnum,
9699
}
97100

98101
// check if all values are valid
99-
struct pyfb_videomode_info vinfo;
100-
pyfb_vinfo(fbnum, &vinfo);
101-
102102
unsigned long int xres = vinfo.vinfo.xres;
103103
unsigned long int yres = vinfo.vinfo.yres;
104104

0 commit comments

Comments
 (0)