mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4354: dynamic loading of libsodium not handled properly
Problem: Dynamic loading of libsodium not handled properly. Solution: Fix has() and :version. Show an error message when loading fails. Fix memory leaks. (Ken Takata, closes #9754)
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef DYNAMIC_DIRECTX
|
||||
extern "C" HINSTANCE vimLoadLib(char *name);
|
||||
extern "C" HINSTANCE vimLoadLib(const char *name);
|
||||
|
||||
typedef int (WINAPI *PGETUSERDEFAULTLOCALENAME)(LPWSTR, int);
|
||||
typedef HRESULT (WINAPI *PD2D1CREATEFACTORY)(D2D1_FACTORY_TYPE,
|
||||
@@ -1212,8 +1212,8 @@ DWrite_Init(void)
|
||||
{
|
||||
#ifdef DYNAMIC_DIRECTX
|
||||
// Load libraries.
|
||||
hD2D1DLL = vimLoadLib(const_cast<char*>("d2d1.dll"));
|
||||
hDWriteDLL = vimLoadLib(const_cast<char*>("dwrite.dll"));
|
||||
hD2D1DLL = vimLoadLib("d2d1.dll");
|
||||
hDWriteDLL = vimLoadLib("dwrite.dll");
|
||||
if (hD2D1DLL == NULL || hDWriteDLL == NULL)
|
||||
{
|
||||
DWrite_Final();
|
||||
|
Reference in New Issue
Block a user