mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	Fixed crash when the string resource is not found in Language.dll.
This commit is contained in:
		@@ -745,7 +745,7 @@ std::wstring GetFormattedString(UINT id, ...)
 | 
			
		||||
	va_list args = NULL;
 | 
			
		||||
	va_start(args, id);
 | 
			
		||||
 | 
			
		||||
	FormatMessage(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER,
 | 
			
		||||
	DWORD len = FormatMessage(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER,
 | 
			
		||||
				  GetString(id),
 | 
			
		||||
				  0,
 | 
			
		||||
				  0,
 | 
			
		||||
@@ -755,8 +755,8 @@ std::wstring GetFormattedString(UINT id, ...)
 | 
			
		||||
 | 
			
		||||
	va_end(args);
 | 
			
		||||
 | 
			
		||||
	std::wstring tmpSz = pBuffer;
 | 
			
		||||
	LocalFree(pBuffer);
 | 
			
		||||
	std::wstring tmpSz(len ? pBuffer : L"");
 | 
			
		||||
	if (pBuffer) LocalFree(pBuffer);
 | 
			
		||||
	return tmpSz;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user