Commit 947e47528345ab821b4d0fc7d3f0472fa236045e

Werner Lemberg 2021-02-04T10:19:26

[base] Fix Netpbm tracing message. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Don't emit Netpbm warning if there is nothing to output.

diff --git a/ChangeLog b/ChangeLog
index 0251ce0..8f81b09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2021-02-04  Werner Lemberg  <wl@gnu.org>
 
+	[base] Fix Netpbm tracing message.
+
+	* src/base/ftobjs.c (FT_Render_Glyph_Internal): Don't emit Netpbm
+	warning if there is nothing to output.
+
+2021-02-04  Werner Lemberg  <wl@gnu.org>
+
 	* src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.
 
 	This ensures good logging output, with all lines having a proper
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index eca61fc..dd478e0 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4733,11 +4733,11 @@
 
     /* we use FT_TRACE7 in this block */
     if ( !error                               &&
-         ft_trace_levels[trace_checksum] >= 7 )
+         ft_trace_levels[trace_checksum] >= 7 &&
+         slot->bitmap.buffer                  )
     {
       if ( slot->bitmap.rows  < 128U &&
-           slot->bitmap.width < 128U &&
-           slot->bitmap.buffer       )
+           slot->bitmap.width < 128U )
       {
         int  rows  = (int)slot->bitmap.rows;
         int  width = (int)slot->bitmap.width;