summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-02-17 08:27:32 -0800
committerIan Romanick <ian.d.romanick@intel.com>2009-02-17 08:27:32 -0800
commit4039603413f9f46d7f725463a70b4a51838e0049 (patch)
tree42434505c91eecf425da0cdc471bbe486a99f6c1 /glx
parentbac13e54b164ceff7b921a2d17c4a198b42aeccf (diff)
glx: Inialize best_score before calculating visual scores
This bug was pointed out by Peter Åstrand. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxscreens.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 87119fb5b..6f68b066a 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -354,7 +354,7 @@ static __GLXconfig *
pickFBConfig(__GLXscreen *pGlxScreen, VisualPtr visual)
{
__GLXconfig *best = NULL, *config;
- int best_score;
+ int best_score = 0;
for (config = pGlxScreen->fbconfigs; config != NULL; config = config->next) {
int score = 0;