app, libgimpwidgets: fix CRITICAL on NULL GimpUnit.
I missed this one because it was using 0 instead of the GIMP_UNIT_PIXEL macro. This was triggering CRITICALs when using the text tool.
This commit is contained in:
parent
07196f371b
commit
bc73232cd9
2 changed files with 2 additions and 1 deletions
|
|
@ -211,7 +211,7 @@ gimp_text_style_editor_init (GimpTextStyleEditor *editor)
|
|||
_("Change font of selected text"), NULL);
|
||||
|
||||
editor->size_entry =
|
||||
gimp_size_entry_new (1, 0, "%a", TRUE, FALSE, FALSE, 10,
|
||||
gimp_size_entry_new (1, gimp_unit_pixel (), "%a", TRUE, FALSE, FALSE, 10,
|
||||
GIMP_SIZE_ENTRY_UPDATE_SIZE);
|
||||
gtk_box_pack_start (GTK_BOX (editor->upper_hbox), editor->size_entry,
|
||||
FALSE, FALSE, 0);
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ gimp_size_entry_new (gint number_of_fields,
|
|||
GimpUnitStore *store;
|
||||
gint i;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_UNIT (unit), NULL);
|
||||
g_return_val_if_fail ((number_of_fields >= 0) && (number_of_fields <= 16),
|
||||
NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue