[gimp] app: avoid flushing bufferless projections
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: avoid flushing bufferless projections
- Date: Wed, 28 Nov 2018 18:28:02 +0000 (UTC)
commit b07f8102738d8225c1e77e6b4f68ae12468d8a2b
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.
app/core/gimpprojection.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c
index 158cb48231..2a8264a9d8 100644
--- a/app/core/gimpprojection.c
+++ b/app/core/gimpprojection.c
@@ -785,6 +785,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]