summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvo/vo_gl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 733be27a0f..fbc2b6cfda 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -230,13 +230,14 @@ static void clearOSD(void) {
* \brief remove textures, display list and free memory used by EOSD
*/
static void clearEOSD(void) {
- if (!eosdtexCnt)
- return;
- glDeleteTextures(eosdtexCnt, eosdtex);
+ if (eosdDispList)
+ glDeleteLists(eosdDispList, 1);
+ eosdDispList = 0;
+ if (eosdtexCnt)
+ glDeleteTextures(eosdtexCnt, eosdtex);
+ eosdtexCnt = 0;
free(eosdtex);
eosdtex = NULL;
- glDeleteLists(eosdDispList, 1);
- eosdtexCnt = 0;
}
/**