mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
FBFontRenderClass/CNeutrinoFonts: ensure reset of some instances
Only for safety.
Origin commit data
------------------
Commit: 71d0c42a47
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-06-15 (Thu, 15 Jun 2017)
This commit is contained in:
@@ -99,7 +99,7 @@ FBFontRenderClass::~FBFontRenderClass()
|
||||
for (fontListEntry * f = font; f; f = g)
|
||||
{
|
||||
g = f->next;
|
||||
delete f;
|
||||
delete f; f = NULL;
|
||||
}
|
||||
|
||||
FTC_Manager_Done(cacheManager);
|
||||
|
@@ -92,14 +92,18 @@ void CNeutrinoFonts::InitDynFonts()
|
||||
CNeutrinoFonts::~CNeutrinoFonts()
|
||||
{
|
||||
if (!v_share_fonts.empty()) {
|
||||
for (unsigned int i = 0; i < v_share_fonts.size(); i++)
|
||||
for (unsigned int i = 0; i < v_share_fonts.size(); i++){
|
||||
delete v_share_fonts[i].font;
|
||||
v_share_fonts[i].font = NULL;
|
||||
}
|
||||
v_share_fonts.clear();
|
||||
}
|
||||
|
||||
if (!v_dyn_fonts.empty()) {
|
||||
for (unsigned int i = 0; i < v_dyn_fonts.size(); i++)
|
||||
for (unsigned int i = 0; i < v_dyn_fonts.size(); i++){
|
||||
delete v_dyn_fonts[i].font;
|
||||
v_dyn_fonts[i].font = NULL;
|
||||
}
|
||||
v_dyn_fonts.clear();
|
||||
}
|
||||
if (!vDynSize.empty()) {
|
||||
@@ -402,8 +406,10 @@ void CNeutrinoFonts::deleteDynFontExtAll()
|
||||
{
|
||||
if (!v_dyn_fonts_ext.empty()) {
|
||||
for (size_t i = 0; i < v_dyn_fonts_ext.size(); ++i) {
|
||||
if (v_dyn_fonts_ext[i].font != NULL)
|
||||
if (v_dyn_fonts_ext[i].font != NULL){
|
||||
delete v_dyn_fonts_ext[i].font;
|
||||
v_dyn_fonts_ext[i].font = NULL;
|
||||
}
|
||||
}
|
||||
v_dyn_fonts_ext.clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user