~ubuntu-branches/debian/stretch/gpaint/stretch

« back to all changes in this revision

Viewing changes to debian/patches/21_fix_crash_on_fill_button_click.diff

  • Committer: Bazaar Package Importer
  • Author(s): Goedson Teixeira Paixao
  • Date: 2009-12-29 23:04:23 UTC
  • Revision ID: james.westby@ubuntu.com-20091229230423-x1foh5o43h0xxztj
Tags: 0.3.3-6
* debian/patches/26_fix_toolbar.diff: don't set the style for the toolbar,
  allowing gpaint to follow the user's preferences (Closes: #497488)
  (LP: #127296)
* debian/patches/21_fix_crash_on_fill_button_click.dpatch: fixed the check
  for null drawing_area.
* debian/patches/*.dpatch: renamed to *.diff since we're not using dpatch
  anymore
* debian/control: added ${misc:Depends} to the binary package Depends
* debian/patches/*.diff: Added meta information tags compliant with DEP-3
  recommendations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
9
 
 
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
 
14
@@ -156,7 +156,10 @@
 
15
 {
 
16
     debug_fn();
 
17
     GtkStyle *style;
 
18
-    GtkWidget *widget = GTK_WIDGET(tool->canvas->drawing_area);
 
19
+    GtkWidget *widget = NULL;
 
20
+
 
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);
 
24
     g_assert(style);
 
25