Index: trunk/src/event/editor/frame/Editor.java
===================================================================
--- trunk/src/event/editor/frame/Editor.java	(revision 94)
+++ trunk/src/event/editor/frame/Editor.java	(revision 97)
@@ -378,5 +378,5 @@
         int index = jTabbedPane1.getSelectedIndex();
 
-        if (index > 0 && jTabbedPane1.getTabComponentAt(index) != null)
+        if (index >= 0 && jTabbedPane1.getTabComponentAt(index) != null)
         {
             JPanel removable = (JPanel) jTabbedPane1
@@ -481,5 +481,8 @@
                     {
                     }
-                    jTabbedPane1.setTabComponentAt(index, title);
+                    if (index < jTabbedPane1.getTabCount())
+                    {
+                        jTabbedPane1.setTabComponentAt(index, title);
+                    }
                     try
                     {
@@ -489,5 +492,8 @@
                     {
                     }
-                    jTabbedPane1.setForegroundAt(index, c);
+                    if (index < jTabbedPane1.getTabCount())
+                    {
+                        jTabbedPane1.setForegroundAt(index, c);
+                    }
                 }
             }).start();
