diff --git a/osd.c b/osd.c index a6a4552..42b7d36 100644 --- a/osd.c +++ b/osd.c @@ -515,12 +515,12 @@ void cXinelibOsd::Flush(void) if (IsTrueColor()) { LOCK_PIXMAPS; - while (cPixmapMemory *pm = RenderPixmaps()) { + while (cPixmapMemory *pm = dynamic_cast(RenderPixmaps())) { int w = pm->ViewPort().Width(); int h = pm->ViewPort().Height(); int d = w * sizeof(tColor); CmdArgb(Left() + pm->ViewPort().X(), Top() + pm->ViewPort().Y(), w, h, pm->Data(), h * d); - delete pm; + DestroyPixmap(pm); } return;