summaryrefslogtreecommitdiffstats
path: root/x11-themes/gtk-engines2/files/patch-pixmap::pixmap_theme_draw.c
blob: b3e522813d8b3b1776b81e787d70ca6c737ae38a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
--- pixmap/pixmap_theme_draw.c.orig	Mon Feb  7 03:33:43 2000
+++ pixmap/pixmap_theme_draw.c	Fri Apr 12 15:24:40 2002
@@ -403,8 +403,9 @@
 		      gdk_gc_set_clip_origin(gc, 0, 0);
 		    }
 		}
-	      gdk_imlib_free_pixmap(p);
 	    }
+	  if (p)
+	    gdk_imlib_free_pixmap(p);
 	  gdk_imlib_destroy_image(im);
 	}
     }
@@ -467,8 +468,9 @@
 	  gdk_gc_set_clip_mask(gc, NULL);
 	  gdk_gc_set_clip_origin(gc, 0, 0);
 	}
-      gdk_imlib_free_pixmap(p);
     }
+  if (p)
+    gdk_imlib_free_pixmap(p);
   gdk_imlib_destroy_image(im);
 }
 
@@ -591,8 +593,9 @@
 		  gdk_gc_set_clip_mask(gc, NULL);
 		  gdk_gc_set_clip_origin(gc, 0, 0);
 		}
-	      gdk_imlib_free_pixmap(p);
 	    }
+	  if (p)
+	    gdk_imlib_free_pixmap(p);
 	  gdk_imlib_destroy_image(im);
 	}
     }
@@ -956,11 +959,13 @@
 		  gdk_gc_set_clip_mask(gc, NULL);
 		  gdk_gc_set_clip_origin(gc, 0, 0);
 		}
-
-	      gdk_imlib_free_pixmap(p);
-	      gdk_imlib_free_pixmap(p1);
-	      gdk_imlib_free_pixmap(p2);
 	    }
+	  if (p)
+	    gdk_imlib_free_pixmap(p);
+	  if (p1)
+	    gdk_imlib_free_pixmap(p1);
+	  if (p2)
+	    gdk_imlib_free_pixmap(p2);
 	  gdk_imlib_destroy_image(im);
 	  gdk_imlib_destroy_image(im1);
 	  gdk_imlib_destroy_image(im2);
@@ -1202,11 +1207,15 @@
 		  gdk_gc_set_clip_mask(gc, NULL);
 		  gdk_gc_set_clip_origin(gc, 0, 0);
 		}
-	      gdk_imlib_free_pixmap(p);
-	      gdk_imlib_free_pixmap(p1);
-	      gdk_imlib_free_pixmap(p2);
-	      gdk_imlib_free_pixmap(p3);
 	    }
+	  if (p)
+	    gdk_imlib_free_pixmap(p);
+	  if (p1)
+	    gdk_imlib_free_pixmap(p1);
+	  if (p2)
+	    gdk_imlib_free_pixmap(p2);
+	  if (p3)
+	    gdk_imlib_free_pixmap(p3);
 	  gdk_imlib_destroy_image(im);
 	  gdk_imlib_destroy_image(im1);
 	  gdk_imlib_destroy_image(im2);

OpenPOWER on IntegriCloud