[gimp] app: Bail out, not fail, in gimp_view_render_to_surface() buffer test
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: Bail out, not fail, in gimp_view_render_to_surface() buffer test
- Date: Wed, 6 Jan 2010 10:35:19 +0000 (UTC)
commit eae77112e105dfc682e6184a747542fd77557d6e
Author: Martin Nordholts <martinn src gnome org>
Date: Wed Jan 6 11:35:37 2010 +0100
app: Bail out, not fail, in gimp_view_render_to_surface() buffer test
Don't fail when checking for availability of buffers in
gimp_view_render_to_surface(). The buffers will be gone when quitting
GIMP while in s-w-m and we don't want to print a warning every time
that happens.
app/widgets/gimpviewrenderer.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpviewrenderer.c b/app/widgets/gimpviewrenderer.c
index 1ec7388..927721d 100644
--- a/app/widgets/gimpviewrenderer.c
+++ b/app/widgets/gimpviewrenderer.c
@@ -928,9 +928,10 @@ gimp_view_render_to_surface (TempBuf *temp_buf,
/* In rare cases we can get here while GIMP is exiting, handle that
* by checking for availability of the buffers
*/
- g_return_if_fail (gimp_render_check_buf != NULL);
- g_return_if_fail (gimp_render_empty_buf != NULL);
- g_return_if_fail (gimp_render_white_buf != NULL);
+ if (! gimp_render_check_buf ||
+ ! gimp_render_empty_buf ||
+ ! gimp_render_white_buf)
+ return;
dest = cairo_image_surface_get_data (surface);
dest_stride = cairo_image_surface_get_stride (surface);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]