[Freeciv-Dev] Re: (PR#11054) freeciv client-xaw crashed after selecting
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=11054 >
==16155== Conditional jump or move depends on uninitialised value(s)
==16155== at 0x810C1BC: pixmap_put_sprite (mapview.c:393)
==16155== by 0x810C221: canvas_put_sprite (mapview.c:406)
This patch should fix it. Please test.
jason
Index: client/gui-xaw/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/mapview.c,v
retrieving revision 1.184
diff -u -r1.184 mapview.c
--- client/gui-xaw/mapview.c 11 Oct 2004 01:52:16 -0000 1.184
+++ client/gui-xaw/mapview.c 17 Nov 2004 16:04:20 -0000
@@ -379,7 +379,7 @@
int offset_x, int offset_y,
int width, int height)
{
- if (sprite->mask) {
+ if (sprite->has_mask) {
XSetClipOrigin(display, civ_gc, canvas_x, canvas_y);
XSetClipMask(display, civ_gc, sprite->mask);
}
@@ -390,7 +390,7 @@
width, height,
canvas_x, canvas_y);
- if (sprite->mask) {
+ if (sprite->has_mask) {
XSetClipMask(display, civ_gc, None);
}
}
@@ -453,7 +453,7 @@
struct Sprite *psprite, enum color_std color,
int canvas_x, int canvas_y)
{
- if (psprite->mask) {
+ if (psprite->has_mask) {
XSetClipOrigin(display, fill_tile_gc, canvas_x, canvas_y);
XSetClipMask(display, fill_tile_gc, psprite->mask);
}
@@ -462,7 +462,7 @@
XFillRectangle(display, pcanvas->pixmap, fill_tile_gc,
canvas_x, canvas_y, psprite->width, psprite->height);
- if (psprite->mask) {
+ if (psprite->has_mask) {
XSetClipMask(display, fill_tile_gc, None);
}
}
@@ -473,7 +473,7 @@
void canvas_fog_sprite_area(struct canvas *pcanvas, struct Sprite *psprite,
int canvas_x, int canvas_y)
{
- if (psprite->mask) {
+ if (psprite->has_mask) {
XSetClipOrigin(display, fill_tile_gc, canvas_x, canvas_y);
XSetClipMask(display, fill_tile_gc, psprite->mask);
}
@@ -484,7 +484,7 @@
XFillRectangle(display, pcanvas->pixmap, fill_tile_gc,
canvas_x, canvas_y, psprite->width, psprite->height);
- if (psprite->mask) {
+ if (psprite->has_mask) {
XSetClipMask(display, fill_tile_gc, None);
}
}
|
|