Blob Blame History Raw
--- src/skeleton/edittreeview.cpp.debug	2008-12-21 23:13:30.000000000 +0900
+++ src/skeleton/edittreeview.cpp	2008-12-30 11:06:19.000000000 +0900
@@ -852,8 +852,14 @@
     Gtk::TreePath path = path_dest;
 
     if( path.empty() ){
-        path = get_model()->get_path( *( get_model()->children().rbegin() ) );
-        path.next();
+        Gtk::TreeModel::Children children = get_model()->children();
+
+        if( ! children.empty() )
+         {
+            path = get_model()->get_path( *( children.rbegin() ) );
+            path.next();
+         }
+        else return;
     }
 
     else if( before );