|
From: phantomjinx <pha...@us...> - 2012-11-10 21:40:36
|
commit 055b183183636dd172c710c72fac161df708cb36
Author: phantomjinx <p.g...@ph...>
Date: Sat Nov 10 21:27:03 2012 +0000
Mitigate possibility of sort tab category where track has no value
* Possible that a track is used to display a sort tab category but that
the track has no metadata value for the category.
* Replaces with a hard constant to avoid null pointer crashes
Thanks to j.neuschaefer at gmx.net for reporting and debugging
plugins/sorttab_display/normal_sorttab_page.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/sorttab_display/normal_sorttab_page.c b/plugins/sorttab_display/normal_sorttab_page.c
index ea64cf7..ee00304 100644
--- a/plugins/sorttab_display/normal_sorttab_page.c
+++ b/plugins/sorttab_display/normal_sorttab_page.c
@@ -990,8 +990,12 @@ void normal_sort_tab_page_add_track(NormalSortTabPage *self, Track *track, gbool
entry = g_malloc0(sizeof(TabEntry));
if (group_track)
entry->name = g_strdup(_("Compilations"));
- else
+ else {
+ if (! entryname)
+ entryname = g_strdup(_("No Metadata Value"));
+
entry->name = g_strdup(entryname);
+ }
_st_build_sortkeys(entry);
entry->compilation = group_track;
|