[gimp/goat-invasion: 385/526] app: don't return bogus paint buffers if get_paint_area() returned NULL
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 385/526] app: don't return bogus paint buffers if get_paint_area() returned NULL
- Date: Sun, 22 Apr 2012 13:31:37 +0000 (UTC)
commit b33aca1f07c9bf544a06d46535eb4975e37d7375
Author: Michael Natterer <mitch gimp org>
Date: Sun Apr 1 20:18:06 2012 +0200
app: don't return bogus paint buffers if get_paint_area() returned NULL
app/paint/gimppaintcore.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index fa8c35f..fc5d836 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -693,12 +693,15 @@ gimp_paint_core_get_paint_buffer (GimpPaintCore *core,
g_return_val_if_fail (paint_buffer_x != NULL, NULL);
g_return_val_if_fail (paint_buffer_y != NULL, NULL);
- gimp_paint_core_get_paint_area (core, drawable, paint_options, coords);
+ if (gimp_paint_core_get_paint_area (core, drawable, paint_options, coords))
+ {
+ *paint_buffer_x = core->paint_buffer_x;
+ *paint_buffer_y = core->paint_buffer_y;
- *paint_buffer_x = core->paint_buffer_x;
- *paint_buffer_y = core->paint_buffer_y;
+ return core->paint_buffer;
+ }
- return core->paint_buffer;
+ return NULL;
}
GeglBuffer *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]