mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-08-27 19:50:23 +00:00
Fixed application crash when saving details and locale not set
svn path=/trunk/; revision=1012
This commit is contained in:
parent
3aa38a3563
commit
8a1760928f
|
@ -1,3 +1,8 @@
|
|||
2008-12-21 Curtis Gedak <gedakc@gmail.com>
|
||||
|
||||
* src/Utils.cc: Fixed application crash.
|
||||
- GParted would crash when saving details if locale was not set.
|
||||
|
||||
2008-12-20 Curtis Gedak <gedakc@gmail.com>
|
||||
|
||||
* src/ext4.cc: Add flags to create journal and use extent option.
|
||||
|
|
|
@ -406,6 +406,9 @@ Glib::ustring Utils::get_lang()
|
|||
//Convert the underscore "_" to a hyphen "-"
|
||||
Glib::ustring sought = "_" ;
|
||||
Glib::ustring 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 ;
|
||||
|
|
Loading…
Reference in a new issue