[gimp/metadata-improvements: 6/11] plug-ins: fix crash in metadata-editor when licensor phone data was NULL.




commit a048c8f2a47e1311d4339f872515457328e912e0
Author: Jacob Boerema <jgboerema gmail com>
Date:   Mon Nov 30 17:36:34 2020 -0500

    plug-ins: fix crash in metadata-editor when licensor phone data was NULL.

 plug-ins/metadata/metadata-editor.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/metadata/metadata-editor.c b/plug-ins/metadata/metadata-editor.c
index 2fc59e7960..e535e6d218 100644
--- a/plug-ins/metadata/metadata-editor.c
+++ b/plug-ins/metadata/metadata-editor.c
@@ -3298,14 +3298,16 @@ metadata_dialog_editor_set_metadata (GExiv2Metadata *metadata,
 
                           for (types = 0; types < 6; types++)
                             {
-                              if (! strcmp (tagdata[item][3],
+                              if (tagdata[item][3] &&
+                                  ! strcmp (tagdata[item][3],
                                             phone_types[types].data))
                                 {
                                   strcpy (type1,
                                           gettext (phone_types[types].display));
                                 }
 
-                              if (! strcmp (tagdata[item][5],
+                              if (tagdata[item][5] &&
+                                  ! strcmp (tagdata[item][5],
                                             phone_types[types].data))
                                 {
                                   strcpy (type2,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]