1
Author: Goedson Teixeira Paixao <goedson@debian.org>
2
Description: fix crash on fill button click
3
Avoid crashing when clicking on fill button by checking that
4
tool->canvas->drawing_area is not null before casting it to GtkWidget
5
Bug-Debian: http://bugs.debian.org/544162
6
Bug-Ubuntu: https://bugs.edge.launchpad.net/ubuntu/+source/gpaint/+bug/227174
7
Bug: https://savannah.gnu.org/bugs/?25117
8
Forwarded: https://savannah.gnu.org/patch/?7045
10
Index: pkg-gpaint/src/text.c
11
===================================================================
12
--- pkg-gpaint.orig/src/text.c 2009-12-22 21:03:29.000000000 -0200
13
+++ pkg-gpaint/src/text.c 2009-12-23 13:01:33.000000000 -0200
18
- GtkWidget *widget = GTK_WIDGET(tool->canvas->drawing_area);
19
+ GtkWidget *widget = NULL;
21
+ if ((tool->canvas == NULL) || (tool->canvas->drawing_area == NULL)) return FALSE;
22
+ widget = GTK_WIDGET(tool->canvas->drawing_area);
23
style = gtk_widget_get_style(widget);