Skip to content

Commit

Permalink
Make this more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldeicaza committed Mar 9, 2011
1 parent c167d0c commit 71b549c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TweetStation/Data/Tweet.cs
Expand Up @@ -69,7 +69,8 @@ public partial class Tweet {

static long GetLong (JsonObject json, string key)
{
if (json [key].JsonType == JsonType.Number)
var jv = json [key];
if (jv != null && jv.JsonType == JsonType.Number)
return (long) json [key];
else
return 0;
Expand Down

0 comments on commit 71b549c

Please sign in to comment.