[gimp/goat-invasion: 385/418] 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/418] app: don't return bogus paint buffers if get_paint_area() returned NULL
- Date: Wed, 4 Apr 2012 10:58:09 +0000 (UTC)
commit db9b8750064935513a8a7d238d98e5824fb6216b
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]