OSDN Git Service

ex.ResponseがNothingの場合、UserAgentの処理の部分でNullReferenceExceptionが発生していたのを修正
authorf_swallow <f_swallow@users.sourceforge.jp>
Thu, 16 Dec 2010 13:52:39 +0000 (13:52 +0000)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Feb 2012 14:17:13 +0000 (23:17 +0900)
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@1214 e39ad16e-3079-482e-bb30-4b4d378143b6

Tween/Twitter.vb

index fefe1a2..685a994 100644 (file)
@@ -3071,7 +3071,7 @@ Public Class Twitter
                         RaiseEvent Stopped()
                         TraceOut("Stop:Timeout")
                         Thread.Sleep(10 * 1000)
-                    ElseIf CType(ex.Response, HttpWebResponse).StatusCode = 420 Then
+                    ElseIf ex.Response IsNot Nothing AndAlso CType(ex.Response, HttpWebResponse).StatusCode = 420 Then
                         TraceOut("Stop:Connection Limit")
                         Exit Do
                     Else