gparted r1061 - in trunk: . src



Author: gedakc
Date: Mon Feb  9 17:58:42 2009
New Revision: 1061
URL: http://svn.gnome.org/viewvc/gparted?rev=1061&view=rev

Log:
Fixed crash on startup with Russian language

Modified:
   trunk/ChangeLog
   trunk/src/Win_GParted.cc

Modified: trunk/src/Win_GParted.cc
==============================================================================
--- trunk/src/Win_GParted.cc	(original)
+++ trunk/src/Win_GParted.cc	Mon Feb  9 17:58:42 2009
@@ -229,8 +229,11 @@
 	//  FIXME:  Is there a better way to do this, perhaps without the conditional?  At the moment this seems to be the best compromise.
 	bool display_undo = true ;
 	if( str_temp .length() > 14 ) {
-		str_temp .replace( str_temp .find( "/" ), 1, "\n/" ) ;
-		display_undo = false ;
+		size_t index = str_temp .find( "/" ) ;
+		if ( index != Glib::ustring::npos ) {
+			str_temp .replace( index, 1, "\n/" ) ;
+			display_undo = false ;
+		}
 	}
 	toolbutton = Gtk::manage(new Gtk::ToolButton( *image, str_temp ));
 	toolbutton ->signal_clicked().connect( sigc::mem_fun(*this, &Win_GParted::activate_resize) );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]