[gimp/gimp-2-8] app: don't crash when a color profile has no information



commit edfba8edfdf3e3bb6983a2123eb9a1b13f700add
Author: Michael Natterer <mitch gimp org>
Date:   Tue Sep 25 20:56:54 2012 +0200

    app: don't crash when a color profile has no information
    
    (cherry picked from commit 9d42df5fa2d2ce598c5896cb0f023a5db65c7f2a)

 app/widgets/gimpprofilechooserdialog.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpprofilechooserdialog.c b/app/widgets/gimpprofilechooserdialog.c
index 79e408d..358dee5 100644
--- a/app/widgets/gimpprofilechooserdialog.c
+++ b/app/widgets/gimpprofilechooserdialog.c
@@ -332,7 +332,7 @@ gimp_profile_view_query (GimpProfileChooserDialog *dialog)
                                          &name, &desc, &info,
                                          NULL))
         {
-          gsize info_len = strlen (info);
+          gsize info_len = info ? strlen (info) : 0;
           gsize name_len = strlen (filename);
 
           /*  lcms tends to adds the filename at the end of the info string.
@@ -344,7 +344,7 @@ gimp_profile_view_query (GimpProfileChooserDialog *dialog)
               info_len -= name_len;
             }
 
-          gtk_text_buffer_set_text (dialog->buffer, info, info_len);
+          gtk_text_buffer_set_text (dialog->buffer, info ? info : "", info_len);
 
           if (desc)
             {



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