[Tween-svn] [1564] NullRef対応

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 6月 28日 (火) 01:46:21 JST


Revision: 1564
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1564
Author:   kiri_feather
Date:     2011-06-28 01:46:21 +0900 (Tue, 28 Jun 2011)

Log Message:
-----------
NullRef対応

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


-------------- next part --------------
Modified: trunk/Tween/ToolStripAPIGauge.vb
===================================================================
--- trunk/Tween/ToolStripAPIGauge.vb	2011-06-27 06:45:59 UTC (rev 1563)
+++ trunk/Tween/ToolStripAPIGauge.vb	2011-06-27 16:46:21 UTC (rev 1564)
@@ -44,7 +44,7 @@
     Public Property GaugeHeight As Integer
         Set(ByVal value As Integer)
             Me._gaugeHeight = value
-            If Not Me.Control.IsDisposed Then Me.Control.Refresh()
+            If Me.Control IsNot Nothing AndAlso Not Me.Control.IsDisposed Then Me.Control.Refresh()
         End Set
         Get
             Return _gaugeHeight
@@ -55,7 +55,7 @@
     Public Property MaxCount As Integer
         Set(ByVal value As Integer)
             Me._maxCount = value
-            If Not Me.Control.IsDisposed Then
+            If Me.Control IsNot Nothing AndAlso Not Me.Control.IsDisposed Then
                 Me.SetText(Me._remainCount, Me._maxCount)
                 Me.Control.Refresh()
             End If
@@ -69,7 +69,7 @@
     Public Property RemainCount As Integer
         Set(ByVal value As Integer)
             Me._remainCount = value
-            If Not Me.Control.IsDisposed Then
+            If Me.Control IsNot Nothing AndAlso Not Me.Control.IsDisposed Then
                 Me.SetText(Me._remainCount, Me._maxCount)
                 Me.Control.Refresh()
             End If
@@ -83,7 +83,7 @@
     Public Property ResetTime As DateTime
         Set(ByVal value As DateTime)
             Me._resetTime = value
-            If Not Me.Control.IsDisposed Then
+            If Me.Control IsNot Nothing AndAlso Not Me.Control.IsDisposed Then
                 Me.SetText(Me._remainCount, Me._maxCount)
                 Me.Control.Refresh()
             End If



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