From: arif Date: Tue, 21 Apr 2009 18:42:21 +0000 (+0000) Subject: a lot of smyrna changes, X-Git-Tag: LAST_LIBGRAPH~32^2~2155 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3394c37327254359789641610c395e5867bbfac5;p=graphviz a lot of smyrna changes, --- diff --git a/lib/glcomp/glcomppanel.c b/lib/glcomp/glcomppanel.c index dd41984e3..9f4b0d3b6 100644 --- a/lib/glcomp/glcomppanel.c +++ b/lib/glcomp/glcomppanel.c @@ -112,7 +112,6 @@ int glCompSetRemovePanel(glCompSet * s, glCompPanel * p) s->panels[ind] = s->panels[ind + 1]; } if (found) { - free(p->font); free(p->text); free(p); s->panelcount--; diff --git a/lib/glcomp/glcompset.c b/lib/glcomp/glcompset.c index 63e725de4..8a05687e1 100644 --- a/lib/glcomp/glcompset.c +++ b/lib/glcomp/glcompset.c @@ -172,28 +172,32 @@ static int glCompPointInButton(glCompButton * p, float x, float y) int glCompSetClick(glCompSet * s, int x, int y) { - if (s) { - int ind = 0; - float X, Y, Z; - - glCompDrawBegin(); - glCompSetGetPos(x, y, &X, &Y, &Z); - glCompDrawEnd(); - - - s->clickedX = X; - s->clickedY = Y; - - for (ind = 0; ind < s->buttoncount; ind++) { - if ((s->buttons[ind]->visible) && (s->buttons[ind]->enabled)) { - if (glCompPointInButton(s->buttons[ind], X, Y)) { - if (s->buttons[ind]->groupid > -1) - s->buttons[ind]->status = 1; + if (s) + { + int ind = 0; + float X, Y, Z; + + glCompDrawBegin(); + glCompSetGetPos(x, y, &X, &Y, &Z); + glCompDrawEnd(); + + + s->clickedX = X; + s->clickedY = Y; + + for (ind = 0; ind < s->buttoncount; ind++) + { + if ((s->buttons[ind]->visible) && (s->buttons[ind]->enabled)) + { + if (glCompPointInButton(s->buttons[ind], X, Y)) + { + if (s->buttons[ind]->groupid > -1) + s->buttons[ind]->status = 1; + } + } } - } - } - return 1; - } else + return 1; + } else return 0; }