From 6f23e9b045a0e6060938fb971483e5f3155db45e Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 5 Jun 2018 14:46:32 +0200 Subject: [PATCH] jj: fix nullreference error for final indicies --- app/DD_PM_WINDREAM/frmProfileDesigner.vb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/DD_PM_WINDREAM/frmProfileDesigner.vb b/app/DD_PM_WINDREAM/frmProfileDesigner.vb index 9045e24..66f1e5b 100644 --- a/app/DD_PM_WINDREAM/frmProfileDesigner.vb +++ b/app/DD_PM_WINDREAM/frmProfileDesigner.vb @@ -197,7 +197,7 @@ Public Class frmProfileDesigner cmbProfiles.Text = NAMETextBox.Text End If Indexe_eintragen() - If tabctrl_Profilkonfig.SelectedIndex = 1 Then + If tabctrl_Profilkonfig.SelectedIndex = 1 And TBPM_PROFILEBindingSource.Position <> -1 Then Refresh_Final_indexe() End If End Sub @@ -206,15 +206,11 @@ Public Class frmProfileDesigner If TBPM_PROFILETableAdapter.cmdAnzProfile + 1 > LICENSE_PROFILES Then MsgBox("Sie haben die maximale Anzahl (" & LICENSE_PROFILES & ") von lizensierten Profilen erreicht!" & vbNewLine & "Bitte löschen Sie Profile oder setzen sich mit Digital Data in Verbindung!", MsgBoxStyle.Exclamation, "Achtung Lizenzhinweis:") Else - Me.TBPM_PROFILEBindingSource.AddNew() + TBPM_PROFILEBindingSource.AddNew() End If End Sub - Private Sub GUIDTextBox_TextChanged(sender As System.Object, e As System.EventArgs) Handles PROFILGUIDTextBox.TextChanged - - End Sub - Private Sub ToolStripButton1_Click(sender As System.Object, e As System.EventArgs) Handles tsbtnDesigner_open.Click If CInt(PROFILGUIDTextBox.Text) > 0 Then profile_guid = PROFILGUIDTextBox.Text @@ -972,4 +968,6 @@ Public Class frmProfileDesigner End Try End If End Sub + + End Class \ No newline at end of file