lib/gterm: Fix NULL dereference in gterm_init cached path

This commit is contained in:
Mintsuki
2026-04-13 14:25:11 +02:00
parent 4ecd2a9e80
commit 44b8493555

View File

@@ -753,8 +753,12 @@ bool gterm_init(struct fb_info **_fbs, size_t *_fbs_count,
static size_t prev_width, prev_height;
if (prev_valid && config == prev_config && width == prev_width && height == prev_height) {
*_fbs = fbs;
*_fbs_count = fbs_count;
if (_fbs != NULL) {
*_fbs = fbs;
}
if (_fbs_count != NULL) {
*_fbs_count = fbs_count;
}
reset_term();
return true;
}