news & event feed safety fix

This commit is contained in:
Christian Fiedler
2013-10-11 14:50:02 +02:00
parent 4c09ec4139
commit c06828e411
2 changed files with 6 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ namespace CampusAppWP8.Feed.Events
if (model == null)
{
// at loading
if (info.Exists == true)
if (info != null && info.Exists == true)
{
retValue = this.CheckIsUpToDate(info.LastWriteTime);
}
@@ -96,7 +96,8 @@ namespace CampusAppWP8.Feed.Events
{
bool retValue = true;
if ((info.Exists == false)
if ((info == null)
|| (info.Exists == false)
|| (info.Length == 0))
{
retValue = false;

View File

@@ -76,7 +76,7 @@ namespace CampusAppWP8.Feed.News
if (model == null)
{
if (info.Exists == true)
if (info != null && info.Exists == true)
{
retValue = this.CheckIsUpToDate(info.LastWriteTime);
}
@@ -95,7 +95,8 @@ namespace CampusAppWP8.Feed.News
{
bool retValue = true;
if ((info.Exists == false)
if ((info == null)
|| (info.Exists == false)
|| (info.Length == 0))
{
retValue = false;