[gimp/gimp-2-10] app: avoid flushing bufferless projections



commit 6ab3ecaca2d2532c7791c8a9f23319cb08556116
Author: Ell <ell_se yahoo com>
Date:   Wed Nov 28 12:53:52 2018 -0500

    app: avoid flushing bufferless projections
    
    Don't needlessly flush projections whose buffer hasn't been
    allocated yet.  This can happen when opening an image, in which
    case the image is flushed before its projection has a buffer.
    
    (cherry picked from commit b07f8102738d8225c1e77e6b4f68ae12468d8a2b)

 app/core/gimpprojection.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c
index ae73b2bee6..b416846809 100644
--- a/app/core/gimpprojection.c
+++ b/app/core/gimpprojection.c
@@ -775,6 +775,9 @@ static void
 gimp_projection_flush_whenever (GimpProjection *proj,
                                 gboolean        now)
 {
+  if (! proj->priv->buffer)
+    return;
+
   if (proj->priv->update_region)
     {
       if (now)  /* Synchronous */


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