Fixed bug where it would panic on startup if there was an epty liststroe.

This commit is contained in:
Jordan Petridis 2017-10-20 01:22:38 +03:00
parent 3d98bf12f3
commit 31d986880b
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6

View File

@ -19,7 +19,12 @@ pub fn populate_podcasts_flowbox(
drop(tempdb);
// Get a ListStore iterator at the first element.
let iter = pd_model.get_iter_first().unwrap();
let iter = if let Some(it) = pd_model.get_iter_first() {
it
} else {
// TODO: Display an empty view
return;
};
loop {
let title = pd_model