From ee46fb9228fd6e70893270703d814a400bb8ca22 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 26 Apr 2013 22:04:18 +0400 Subject: Fixed crash when network is unavailable, added warning message --- Juick/ViewModels/PageViewModel.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Juick/ViewModels/PageViewModel.cs') diff --git a/Juick/ViewModels/PageViewModel.cs b/Juick/ViewModels/PageViewModel.cs index e398caf..ce48449 100644 --- a/Juick/ViewModels/PageViewModel.cs +++ b/Juick/ViewModels/PageViewModel.cs @@ -72,6 +72,8 @@ namespace Juick.ViewModels _context.Client.ExecuteAsync>(request, response => { _context.IsDataLoading = false; + if (response.Data == null) + return; response.Data.Select(x => new PostItem(x)).ToList().ForEach(i => Items.Add(i)); }); _context.IsDataLoading = true; -- cgit v1.2.3