[gimp/goat-invasion: 385/412] 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/412] app: don't return bogus paint buffers if get_paint_area() returned NULL
- Date: Tue, 3 Apr 2012 10:05:29 +0000 (UTC)
commit 570db99ab3a737aae97067e8f0374cec0d03ce87
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]