Skip to content

Commit

Permalink
ChafaSymbolMap: Fix crash caused by incomplete copy of prepared map
Browse files Browse the repository at this point in the history
Reported by @GuardKenzie. Fixes #123 (GitHub).
  • Loading branch information
hpjansson committed Jan 4, 2023
1 parent af0bde3 commit c4a788b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chafa/chafa-symbol-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,11 +1009,16 @@ chafa_symbol_map_copy_contents (ChafaSymbolMap *dest, const ChafaSymbolMap *src)
dest->glyphs2 = copy_glyph2_table (dest->glyphs2);
dest->selectors = copy_selector_array (dest->selectors);
dest->symbols = NULL;
dest->n_symbols = 0;
dest->symbols2 = NULL;
dest->n_symbols2 = 0;
dest->packed_bitmaps = NULL;
dest->packed_bitmaps2 = NULL;
dest->need_rebuild = TRUE;
dest->refs = 1;

if (!src->need_rebuild)
chafa_symbol_map_prepare (dest);
}

void
Expand Down

0 comments on commit c4a788b

Please sign in to comment.