svnno****@sourc*****
svnno****@sourc*****
2011年 1月 11日 (火) 09:47:24 JST
Revision: 1341 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1341 Author: kiri_feather Date: 2011-01-11 09:47:24 +0900 (Tue, 11 Jan 2011) Log Message: ----------- Invoke前にIsDisposed判定追加 Modified Paths: -------------- trunk/Tween/AppendSettingDialog.vb trunk/Tween/ImageListViewItem.vb trunk/Tween/Tween.vb -------------- next part -------------- Modified: trunk/Tween/AppendSettingDialog.vb =================================================================== --- trunk/Tween/AppendSettingDialog.vb 2011-01-10 14:34:31 UTC (rev 1340) +++ trunk/Tween/AppendSettingDialog.vb 2011-01-11 00:47:24 UTC (rev 1341) @@ -2110,7 +2110,7 @@ TwitterApiInfo.UsingCount = UsingApi Dim proc As New Thread(New Threading.ThreadStart(Sub() tw.GetInfoApi(Nothing) '取得エラー時はinfoCountは初期状態(値:-1) - If Me.IsHandleCreated Then Invoke(New MethodInvoker(AddressOf DisplayApiMaxCount)) + If Me.IsHandleCreated AndAlso Not Me.IsDisposed Then Invoke(New MethodInvoker(AddressOf DisplayApiMaxCount)) End Sub)) proc.Start() Else Modified: trunk/Tween/ImageListViewItem.vb =================================================================== --- trunk/Tween/ImageListViewItem.vb 2011-01-10 14:34:31 UTC (rev 1340) +++ trunk/Tween/ImageListViewItem.vb 2011-01-11 00:47:24 UTC (rev 1341) @@ -13,9 +13,11 @@ Dim dummy As Image = imageDictionary.Item(imageKey, Sub(getImg) If getImg Is Nothing Then Exit Sub Me.img = getImg - If Me.ListView IsNot Nothing AndAlso Me.ListView.Created Then Me.ListView.Invoke(Sub() - If Me.Index < Me.ListView.VirtualListSize Then Me.ListView.RedrawItems(Me.Index, Me.Index, False) - End Sub) + If Me.ListView IsNot Nothing AndAlso + Me.ListView.Created AndAlso + Not Me.ListView.IsDisposed Then Me.ListView.Invoke(Sub() + If Me.Index < Me.ListView.VirtualListSize Then Me.ListView.RedrawItems(Me.Index, Me.Index, False) + End Sub) End Sub) End Sub Modified: trunk/Tween/Tween.vb =================================================================== --- trunk/Tween/Tween.vb 2011-01-10 14:34:31 UTC (rev 1340) +++ trunk/Tween/Tween.vb 2011-01-11 00:47:24 UTC (rev 1341) @@ -7299,7 +7299,7 @@ Delegate Sub SetStatusLabelApiDelegate() Private Sub SetStatusLabelApiHandler(ByVal sender As Object, ByVal e As ApiInformationChangedEventArgs) - If InvokeRequired Then + If InvokeRequired AndAlso Not IsDisposed Then Invoke(New SetStatusLabelApiDelegate(AddressOf SetStatusLabelApi)) Else SetStatusLabelApi() @@ -9851,7 +9851,7 @@ Private Sub tw_UserStreamStarted() Me._isActiveUserstream = True - If InvokeRequired Then + If InvokeRequired AndAlso Not IsDisposed Then Invoke(New MethodInvoker(AddressOf tw_UserStreamStarted)) Exit Sub End If @@ -9866,7 +9866,7 @@ Private Sub tw_UserStreamStopped() Me._isActiveUserstream = False - If InvokeRequired Then + If InvokeRequired AndAlso Not IsDisposed Then Invoke(New MethodInvoker(AddressOf tw_UserStreamStopped)) Exit Sub End If @@ -9880,7 +9880,7 @@ End Sub Private Sub tw_UserStreamEventArrived(ByVal ev As Twitter.FormattedEvent) - If InvokeRequired Then + If InvokeRequired AndAlso Not IsDisposed Then Invoke(New Action(Of Twitter.FormattedEvent)(AddressOf tw_UserStreamEventArrived), ev) Exit Sub End If