Skip to content

Commit

Permalink
detail-view: Add null checks for version parsing
Browse files Browse the repository at this point in the history
Fix #612
  • Loading branch information
oscfdezdz committed Mar 28, 2024
1 parent 7c301cf commit a5261e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/exm-detail-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,10 @@ on_data_loaded (GObject *source,
else
version = g_strdup_printf ("%s.0", entry->shell_major_version);

if (strcmp (version, self->shell_version) == 0 || strncmp(version, self->shell_version, strchr(version, '.') - version) == 0)
exm_info_bar_set_version (self->ext_info_bar, entry->extension_version);
if (version != NULL && self->shell_version != NULL) {
if (strcmp (version, self->shell_version) == 0 || strncmp(version, self->shell_version, strchr(version, '.') - version) == 0)
exm_info_bar_set_version (self->ext_info_bar, entry->extension_version);
}

g_free (version);
}
Expand Down

0 comments on commit a5261e0

Please sign in to comment.