Index: trunk/BazaReklam/StartForm.cs
===================================================================
--- trunk/BazaReklam/StartForm.cs (revision 566)
+++ trunk/BazaReklam/StartForm.cs (revision 567)
@@ -236,16 +236,16 @@
         private void klient2ToolStripButton_Click(object sender, EventArgs e)
         {
-            if (zastawienieKontaktowBindingSource.Current != null)
-            {
-                DataRowView row = (DataRowView)zastawienieKontaktowBindingSource.Current;
-
-                int custID = Convert.ToInt32(row["CustomerId"]);
-
-                ClientsForm.getClientsForm((MDIBazaReklam)MdiParent).pokazKlienta(custID);
-
-                Hide();
-
-                ClientsForm.getClientsForm((MDIBazaReklam)MdiParent).Show();
-            }
+            if (zastawienieKontaktowBindingSource.Current == null) return;
+            DataRowView row = (DataRowView) zastawienieKontaktowBindingSource.Current;
+
+            if(row["CustomerId"] is DBNull) return;
+
+            int custID = Convert.ToInt32(row["CustomerId"]);
+
+            ClientsForm.getClientsForm((MDIBazaReklam) MdiParent).pokazKlienta(custID);
+
+            Hide();
+
+            ClientsForm.getClientsForm((MDIBazaReklam) MdiParent).Show();
         }
 
