Skip to content

Commit

Permalink
prevent null dereference, make gcc happy
Browse files Browse the repository at this point in the history
  • Loading branch information
sagb committed May 11, 2024
1 parent 1b88c14 commit 72a5597
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ int inspectIconMeta(FTSENT * pe)
HASH_FIND_STR(g.ic, app, ic);
if (ic == NULL) {
ic = initIcon();
if (ic == NULL)
return 0;
strncpy(ic->app, app, MAXAPPLEN);
strncpy(ic->src_path, pe->fts_path, MAXICONPATHLEN-1);
ic->src_w = ix;
Expand Down

0 comments on commit 72a5597

Please sign in to comment.