[Tween-svn] [1591] FiltersClass. IsHitでNullRef出る場合があるので暫定対処。要原因究明

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 9月 12日 (月) 15:09:42 JST


Revision: 1591
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1591
Author:   kiri_feather
Date:     2011-09-12 15:09:42 +0900 (Mon, 12 Sep 2011)

Log Message:
-----------
FiltersClass.IsHitでNullRef出る場合があるので暫定対処。要原因究明

Modified Paths:
--------------
    trunk/Tween/StatusDictionary.vb


-------------- next part --------------
Modified: trunk/Tween/StatusDictionary.vb
===================================================================
--- trunk/Tween/StatusDictionary.vb	2011-09-12 05:46:36 UTC (rev 1590)
+++ trunk/Tween/StatusDictionary.vb	2011-09-12 06:09:42 UTC (rev 1591)
@@ -1947,18 +1947,24 @@
         '全フィルタ評価(優先順位あり)
         SyncLock Me._lockObj
             For Each ft As FiltersClass In _filters
-                Select Case ft.IsHit(post)   'フィルタクラスでヒット判定
-                    Case HITRESULT.None
-                    Case HITRESULT.Copy
-                        If rslt <> HITRESULT.CopyAndMark Then rslt = HITRESULT.Copy
-                    Case HITRESULT.CopyAndMark
-                        rslt = HITRESULT.CopyAndMark
-                    Case HITRESULT.Move
-                        rslt = HITRESULT.Move
-                    Case HITRESULT.Exclude
-                        rslt = HITRESULT.Exclude
-                        Exit For
-                End Select
+                Try
+                    Select Case ft.IsHit(post)   'フィルタクラスでヒット判定
+                        Case HITRESULT.None
+                        Case HITRESULT.Copy
+                            If rslt <> HITRESULT.CopyAndMark Then rslt = HITRESULT.Copy
+                        Case HITRESULT.CopyAndMark
+                            rslt = HITRESULT.CopyAndMark
+                        Case HITRESULT.Move
+                            rslt = HITRESULT.Move
+                        Case HITRESULT.Exclude
+                            rslt = HITRESULT.Exclude
+                            Exit For
+                    End Select
+                Catch ex As NullReferenceException
+                    'IsHitでNullRef出る場合あり。暫定対応
+                    TraceOut("IsHitでNullRef: " + ft.ToString)
+                    rslt = HITRESULT.None
+                End Try
             Next
         End SyncLock
 



Tween-svn メーリングリストの案内
Back to archive index