mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't call g_utf8_strlen with a NULL pointer.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13083 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
6e63f6b452
commit
b9724e3063
@ -1,5 +1,8 @@
|
|||||||
2006-02-02 David Hampton <hampton@employees.org>
|
2006-02-02 David Hampton <hampton@employees.org>
|
||||||
|
|
||||||
|
* src/register/register-core/numcell.c: Don't call g_utf8_strlen
|
||||||
|
with a NULL pointer. Fixes 329556.
|
||||||
|
|
||||||
* src/gnome-utils/gnc-tree-model-commodity.c:
|
* src/gnome-utils/gnc-tree-model-commodity.c:
|
||||||
* src/gnome-utils/gnc-tree-model-account.c:
|
* src/gnome-utils/gnc-tree-model-account.c:
|
||||||
* src/gnome-utils/gnc-tree-model-price.c: Better handling in the
|
* src/gnome-utils/gnc-tree-model-price.c: Better handling in the
|
||||||
|
@ -88,10 +88,17 @@ gnc_num_cell_modify_verify (BasicCell *_cell,
|
|||||||
gunichar uc;
|
gunichar uc;
|
||||||
glong change_chars;
|
glong change_chars;
|
||||||
|
|
||||||
|
if (change == NULL) /* if we are deleting */
|
||||||
|
/* then just accept the proposed change */
|
||||||
|
{
|
||||||
|
gnc_basic_cell_set_value_internal (&cell->cell, newval);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
change_chars = g_utf8_strlen (change, -1);
|
change_chars = g_utf8_strlen (change, -1);
|
||||||
|
|
||||||
if ((change == NULL) || (change_chars == 0) || /* if we are deleting */
|
if ((change_chars == 0) || /* if we are deleting */
|
||||||
(change_chars > 1)) /* or entering > 1 char */
|
(change_chars > 1)) /* or entering > 1 char */
|
||||||
/* then just accept the proposed change */
|
/* then just accept the proposed change */
|
||||||
{
|
{
|
||||||
gnc_basic_cell_set_value_internal (&cell->cell, newval);
|
gnc_basic_cell_set_value_internal (&cell->cell, newval);
|
||||||
|
Loading…
Reference in New Issue
Block a user