gparted r1012 - in trunk: . src
- From: gedakc svn gnome org
- To: svn-commits-list gnome org
- Subject: gparted r1012 - in trunk: . src
- Date: Sun, 21 Dec 2008 18:55:10 +0000 (UTC)
Author: gedakc
Date: Sun Dec 21 18:55:10 2008
New Revision: 1012
URL: http://svn.gnome.org/viewvc/gparted?rev=1012&view=rev
Log:
Fixed application crash when saving details and locale not set
Modified:
trunk/ChangeLog
trunk/src/Utils.cc
Modified: trunk/src/Utils.cc
==============================================================================
--- trunk/src/Utils.cc (original)
+++ trunk/src/Utils.cc Sun Dec 21 18:55:10 2008
@@ -406,7 +406,10 @@
//Convert the underscore "_" to a hyphen "-"
Glib::ustring sought = "_" ;
Glib::ustring replacement = "-" ;
- lang .replace( lang .find(sought), sought .size(), replacement ) ;
+ //NOTE: Application crashes if string replace is called and sought is not found,
+ // so we need to only perform replace if the sought is found.
+ if ( lang .find(sought) != Glib::ustring::npos )
+ lang .replace( lang .find(sought), sought .size(), replacement ) ;
return lang ;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]