Skip to content

Commit

Permalink
info: Fix segfault in print state
Browse files Browse the repository at this point in the history
Resolves #168.

Signed-off-by: Artem Senichev <[email protected]>
  • Loading branch information
artemsen committed Aug 1, 2024
1 parent b54724d commit 08fe962
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,9 @@ void info_print(struct pixmap* window)
if (ctx.mode == mode_off || !ctx.info.active) {
// print only status
if (ctx.fields[info_status].value.width && ctx.status.active) {
const size_t btype = app_is_viewer() ? mode_viewer : mode_gallery;
for (size_t i = 0; i < INFO_POSITION_NUM; ++i) {
const struct block_scheme* block = &ctx.scheme[ctx.mode][i];
const struct block_scheme* block = &ctx.scheme[btype][i];
for (size_t j = 0; j < block->fields_num; ++j) {
const struct field_scheme* field = &block->fields[j];
if (field->type == info_status) {
Expand Down

0 comments on commit 08fe962

Please sign in to comment.