[blam] Try harder not to crash when loading item content
- From: Carlos MartÃn Nieto <cmartin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [blam] Try harder not to crash when loading item content
- Date: Tue, 23 Aug 2011 21:44:16 +0000 (UTC)
commit a7f3e1e5b90e19812a0083fa25375d5aaaec5c1e
Author: Carlos MartÃn Nieto <carlos cmartin tk>
Date: Tue Aug 23 21:36:26 2011 +0200
Try harder not to crash when loading item content
Signed-off-by: Carlos MartÃn Nieto <carlos cmartin tk>
src/ItemView.cs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/ItemView.cs b/src/ItemView.cs
index 9490a33..97270f4 100644
--- a/src/ItemView.cs
+++ b/src/ItemView.cs
@@ -113,8 +113,8 @@ namespace Imendio.Blam {
(!currentItem.PublishDate.Equals(DateTimeOffset.MinValue)) ?
currentItem.PublishDate.ToString("D", System.Globalization.CultureInfo.CurrentUICulture) :
Catalog.GetString("[No date available]");
- string text = currentItem.Summary.Text;
- //string text = (currentItem.exposed_text as TextSyndicationContent).Text;
+ string text = currentItem.Summary != null ? currentItem.Summary.Text
+ : currentItem.Content != null ? currentItem.Content.ToString() : null;
string title = HtmlUtils.Escape(currentItem.Title.Text);
string url = currentItem.Links[0].Uri.ToString();
baseDir = "file://" + theme.Path;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]