Skip to content

Commit c867b83

Browse files
authored
fix(legacy): fix null-pointer (#177)
1 parent 3f5bbc3 commit c867b83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

legacy/firmware/layout2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,8 +1746,8 @@ static void _layoutDialogAdapter(const BITMAP *icon, const BITMAP *bmp_no,
17461746
oledDrawStringAdapter(left, 1 * (font->pixel + 1), line2, FONT_STANDARD);
17471747
}
17481748
if (line3) {
1749-
if (line2 && (oledStringWidthAdapter(line2, FONT_STANDARD) >
1750-
(OLED_WIDTH - icon->width - 2))) {
1749+
if (line2 &&
1750+
(oledStringWidthAdapter(line2, FONT_STANDARD) > (OLED_WIDTH - left))) {
17511751
oledDrawStringCenterAdapter(OLED_WIDTH / 2, 3 * (font->pixel + 1), line3,
17521752
FONT_STANDARD);
17531753
} else {

0 commit comments

Comments
 (0)