X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmovie-list-view.vala;h=c1f3bcdd24b75909a0adf0e6b85f4f4701974912;hb=4cf5c69b3e860d1e461efb7cc2348e32075f73f8;hp=efb1c2e07861ced35a0e35daba3eb96a9a57ce68;hpb=a8b8eed1842446297bf9491731df3d1b545251b9;p=cinaest diff --git a/src/movie-list-view.vala b/src/movie-list-view.vala index efb1c2e..c1f3bcd 100644 --- a/src/movie-list-view.vala +++ b/src/movie-list-view.vala @@ -307,23 +307,33 @@ public class MovieListView : PannableArea { for (int i = a; i <= b; i++) { var path = new TreePath.from_indices (i); TreeIter iter; - if (store.get_iter (out iter, path)) { - Movie movie; - store.get (iter, MovieListStore.Columns.MOVIE, out movie); - if (movie != null) { - if (poster_mode_) { - if (movie.poster == null || movie.poster.small == null) try { - poster_factory.queue_thumbnail (movie, Poster.SMALL_WIDTH, Poster.SMALL_HEIGHT, false, receive_poster_small); - } catch (Error e) { - warning ("Failed to queue poster request: %s\n", e.message); - } - } else { - if (movie.poster == null || movie.poster.icon == null) try { - poster_factory.queue_thumbnail (movie, Poster.ICON_WIDTH, Poster.ICON_HEIGHT, false, receive_poster_icon); - } catch (Error e) { - warning ("Failed to queue poster request: %s\n", e.message); - } - } + if (!store.get_iter (out iter, path)) + continue; + + Movie movie; + store.get (iter, MovieListStore.Columns.MOVIE, out movie); + if (movie == null) + continue; + + if (poster_mode_) { + if (movie.poster == null || movie.poster.small == null) try { + poster_factory.queue (movie, + Poster.SMALL_WIDTH, + Poster.SMALL_HEIGHT, + true, + receive_poster_small); + } catch (Error e) { + warning ("Failed to queue poster request: %s\n", e.message); + } + } else { + if (movie.poster == null || movie.poster.icon == null) try { + poster_factory.queue (movie, + Poster.ICON_WIDTH, + Poster.ICON_HEIGHT, + true, + receive_poster_icon); + } catch (Error e) { + warning ("Failed to queue poster request: %s\n", e.message); } } }