This fixes a crash in the videolibrary when entering a tvshow with no seasons/episodes and with "Show parent folder item" disabled which results in an empty list and an out of bounds array access on line 293. Thanks to @kib for reporting it.
jenkins build this please
IsEmpty() would be better, but it turns out that that just calls .size(). Still, it should be IsEmpty() here so that when that's fixed it'll benefit.
videolibrary: fix crash when entering an empty tvshow
Fixed. I tried empty(), which didn't exist, didn't think of IsEmpty().
Just to confirm. This commit will fix this, isn't ?
@fernandog: sounds like a different problem. This fixes the case when entering a tvshow with no seasons/episodes.
@Montellese but when I remove the episode from library that tv-show have no episodes. Will try this when gets merged.
If is another problem how can I debug it? There is not enought info in the log. Thanks