Bug #1138: Wrap funcs in CW's GC ops as well. While this is unnecessary
according to the rules as I understand them (bug #1045), not everybody follows the rules. GC funcs were being called on the same GC from within GC ops, and the cwValidateGC caused a loop in the funcs chain that resulted in a crash, notably in cwPolylines.
This commit is contained in:
parent
c8672e7ac7
commit
5335bc8a06
|
@ -65,7 +65,7 @@ cwCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
|
||||||
static void
|
static void
|
||||||
cwDestroyClip(GCPtr pGC);
|
cwDestroyClip(GCPtr pGC);
|
||||||
|
|
||||||
static GCFuncs cwGCFuncs = {
|
GCFuncs cwGCFuncs = {
|
||||||
cwValidateGC,
|
cwValidateGC,
|
||||||
cwChangeGC,
|
cwChangeGC,
|
||||||
cwCopyGC,
|
cwCopyGC,
|
||||||
|
|
|
@ -37,14 +37,19 @@
|
||||||
&src_off_y)
|
&src_off_y)
|
||||||
|
|
||||||
#define PROLOGUE(pGC) do { \
|
#define PROLOGUE(pGC) do { \
|
||||||
|
pGC->funcs = pGCPrivate->wrapFuncs;\
|
||||||
pGC->ops = pGCPrivate->wrapOps;\
|
pGC->ops = pGCPrivate->wrapOps;\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define EPILOGUE(pGC) do { \
|
#define EPILOGUE(pGC) do { \
|
||||||
|
pGCPrivate->wrapFuncs = (pGC)->funcs; \
|
||||||
pGCPrivate->wrapOps = (pGC)->ops; \
|
pGCPrivate->wrapOps = (pGC)->ops; \
|
||||||
|
(pGC)->funcs = &cwGCFuncs; \
|
||||||
(pGC)->ops = &cwGCOps; \
|
(pGC)->ops = &cwGCOps; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
extern GCFuncs cwGCFuncs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GC ops -- wrap each GC operation with our own function
|
* GC ops -- wrap each GC operation with our own function
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue