[gnome-software] Fix a crash when the surface creation fails
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fix a crash when the surface creation fails
- Date: Thu, 1 Dec 2016 20:31:53 +0000 (UTC)
commit 03651649e209e4ca663618e0fa7c451e98cec068
Author: Richard Hughes <richard hughsie com>
Date: Thu Dec 1 20:29:24 2016 +0000
Fix a crash when the surface creation fails
Not sure how this can happen, but it's happened for 12 people.
Resolves:
https://retrace.fedoraproject.org/faf/problems/bthash/?bth=1d1d1e34f2ecaa57bdc720a023a930d2ea83412f
src/gs-common.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-common.c b/src/gs-common.c
index 0567972..4bd0948 100644
--- a/src/gs-common.c
+++ b/src/gs-common.c
@@ -305,6 +305,8 @@ gs_image_set_from_pixbuf_with_scale (GtkImage *image, const GdkPixbuf *pixbuf, g
{
cairo_surface_t *surface;
surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, scale, NULL);
+ if (surface == NULL)
+ return;
gtk_image_set_from_surface (image, surface);
cairo_surface_destroy (surface);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]