mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed a possible memory leak in creating fonts
This commit is contained in:
		| @@ -3650,6 +3650,7 @@ Helmut Binder <cco@aon.at> | ||||
|  for reporting a problem with PMT handling in case locking the Channels list times out | ||||
|  for avoiding a lengthy lock on the Channels list when starting a recording | ||||
|  for fixing a memory leak in handling the NIT | ||||
|  for reporting a possible memory leak in creating fonts | ||||
|  | ||||
| Ulrich Eckhardt <uli@uli-eckhardt.de> | ||||
|  for reporting a problem with shutdown after user inactivity in case a plugin is | ||||
|   | ||||
							
								
								
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -9582,3 +9582,4 @@ Video Disk Recorder Revision History | ||||
| - Fixed unlocking vs. call to EpgHandlers.EndSegmentTransfer() (reported by Christoph | ||||
|   Haubrich). | ||||
| - Fixed a memory leak in handling the NIT (thanks to Helmut Binder). | ||||
| - Fixed a possible memory leak in creating fonts (reported by Helmut Binder). | ||||
|   | ||||
							
								
								
									
										6
									
								
								font.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								font.c
									
									
									
									
									
								
							| @@ -6,7 +6,7 @@ | ||||
|  * | ||||
|  * BiDi support by Osama Alrawab <alrawab@hotmail.com> @2008 Tripoli-Libya. | ||||
|  * | ||||
|  * $Id: font.c 4.2 2016/12/22 12:31:23 kls Exp $ | ||||
|  * $Id: font.c 4.2.1.1 2021/12/27 11:14:05 kls Exp $ | ||||
|  */ | ||||
|  | ||||
| #include "font.h" | ||||
| @@ -429,8 +429,10 @@ cFont *cFont::CreateFont(const char *Name, int CharHeight, int CharWidth) | ||||
| { | ||||
|   cString fn = GetFontFileName(Name); | ||||
|   cFont *f = *fn ? new cFreetypeFont(fn, CharHeight, CharWidth) : NULL; | ||||
|   if (!f || !f->Height()) | ||||
|   if (!f || !f->Height()) { | ||||
|      delete f; | ||||
|      f = new cDummyFont(CharHeight, CharWidth); | ||||
|      } | ||||
|   return f; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user