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



commit 31164859af47317f4f08ee2e51c90ab0b98cc7d2
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.
    
    (cherry picked from commit a048c8f2a47e1311d4339f872515457328e912e0)

 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 05c73585c1..ea9ab8dbd9 100644
--- a/plug-ins/metadata/metadata-editor.c
+++ b/plug-ins/metadata/metadata-editor.c
@@ -3282,14 +3282,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]