[gimp] libgimp: no need to set NULL strings on GimpPDBProcedure
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: no need to set NULL strings on GimpPDBProcedure
- Date: Sun, 8 Sep 2019 22:38:31 +0000 (UTC)
commit 5a57256a24465d764700e9aeaa5a5fd8d66b37b7
Author: Michael Natterer <mitch gimp org>
Date: Mon Sep 9 00:35:56 2019 +0200
libgimp: no need to set NULL strings on GimpPDBProcedure
libgimp/gimppdbprocedure.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/libgimp/gimppdbprocedure.c b/libgimp/gimppdbprocedure.c
index 13bbdb051f..8b47ef8f50 100644
--- a/libgimp/gimppdbprocedure.c
+++ b/libgimp/gimppdbprocedure.c
@@ -230,12 +230,18 @@ _gimp_pdb_procedure_new (GimpPDB *pdb,
gint i;
string = _gimp_pdb_get_proc_image_types (name);
- gimp_procedure_set_image_types (procedure, string);
- g_free (string);
+ if (string)
+ {
+ gimp_procedure_set_image_types (procedure, string);
+ g_free (string);
+ }
string = _gimp_pdb_get_proc_menu_label (name);
- gimp_procedure_set_menu_label (procedure, string);
- g_free (string);
+ if (string)
+ {
+ gimp_procedure_set_menu_label (procedure, string);
+ g_free (string);
+ }
menu_paths = _gimp_pdb_get_proc_menu_paths (name, &n_menu_paths);
for (i = 0; i < n_menu_paths; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]