summaryrefslogtreecommitdiffstats
path: root/graphics/gpaint/patches/21_fix_crash_on_fill_button_click.patch
diff options
context:
space:
mode:
author Petar Petrov2013-06-03 23:27:37 +0200
committer Robby Workman2013-06-04 07:11:33 +0200
commit9a1f447dfc912da1dbb9c656ee1ab54cbb8af686 (patch)
treebc879b2ab623028224152b9220dc3958633e8a8f /graphics/gpaint/patches/21_fix_crash_on_fill_button_click.patch
parentbf4ab6962d0aa471d1906c66041b0f45f8e0391f (diff)
downloadslackbuilds-9a1f447dfc912da1dbb9c656ee1ab54cbb8af686.tar.gz
graphics/gpaint: Added (GNU Paint: a small-scale GTK2 painting program)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'graphics/gpaint/patches/21_fix_crash_on_fill_button_click.patch')
-rw-r--r--graphics/gpaint/patches/21_fix_crash_on_fill_button_click.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/graphics/gpaint/patches/21_fix_crash_on_fill_button_click.patch b/graphics/gpaint/patches/21_fix_crash_on_fill_button_click.patch
new file mode 100644
index 0000000000..132b349030
--- /dev/null
+++ b/graphics/gpaint/patches/21_fix_crash_on_fill_button_click.patch
@@ -0,0 +1,25 @@
+Author: Goedson Teixeira Paixao <goedson@debian.org>
+Description: fix crash on fill button click
+ Avoid crashing when clicking on fill button by checking that
+ tool->canvas->drawing_area is not null before casting it to GtkWidget
+Bug-Debian: http://bugs.debian.org/544162
+Bug-Ubuntu: https://bugs.edge.launchpad.net/ubuntu/+source/gpaint/+bug/227174
+Bug: https://savannah.gnu.org/bugs/?25117
+Forwarded: https://savannah.gnu.org/patch/?7045
+
+Index: pkg-gpaint/src/text.c
+===================================================================
+--- pkg-gpaint.orig/src/text.c 2009-12-22 21:03:29.000000000 -0200
++++ pkg-gpaint/src/text.c 2009-12-23 13:01:33.000000000 -0200
+@@ -156,7 +156,10 @@
+ {
+ debug_fn();
+ GtkStyle *style;
+- GtkWidget *widget = GTK_WIDGET(tool->canvas->drawing_area);
++ GtkWidget *widget = NULL;
++
++ if ((tool->canvas == NULL) || (tool->canvas->drawing_area == NULL)) return FALSE;
++ widget = GTK_WIDGET(tool->canvas->drawing_area);
+ style = gtk_widget_get_style(widget);
+ g_assert(style);
+