Index: TabControl.cs
===================================================================
--- TabControl.cs	(révision 119737)
+++ TabControl.cs	(copie de travail)
@@ -338,7 +338,9 @@
 					}
 				}
 
-				if (old_index != -1 && new_index != -1) {
+				//Modified by surfzoid@gmail.com to prevent crash in some case when removing a TabPage
+				if (old_index >= 0 && old_index < TabPages.Count && new_index >= 0 && new_index < TabPages.Count){
+				//if (old_index != -1 && new_index != -1) {
 					if (!refresh)
 						invalid = GetTabRect (old_index);
 					((TabPage) Controls[old_index]).SetVisible (false);
@@ -383,7 +385,8 @@
 		[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
 		public TabPage SelectedTab {
 			get {
-				if (selected_index == -1)
+				//Modified by surfzoid@gmail.com to prevent crash in some case when removing a TabPage
+				if (selected_index < 0 || selected_index >= tab_pages.Count)
 					return null;
 				return tab_pages [selected_index];
 			}
