Skip to content

Commit

Permalink
引入官方库的修复UIRender某些情况下占用文件不释放的bug,见duilib/duilib#186
Browse files Browse the repository at this point in the history
  • Loading branch information
juhuaguai committed Nov 28, 2018
1 parent 2f7cedd commit eec237f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 10 additions & 2 deletions DuiLib/Core/UIRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,11 @@ TImageInfo* CRenderEngine::LoadImage(STRINGorID bitmap, LPCTSTR type, DWORD mask
FILE_ATTRIBUTE_NORMAL, NULL);
if( hFile == INVALID_HANDLE_VALUE ) break;
dwSize = ::GetFileSize(hFile, NULL);
if( dwSize == 0 ) break;
if (dwSize == 0)
{
::CloseHandle(hFile);
break;
}

DWORD dwRead = 0;
pData = new BYTE[ dwSize ];
Expand Down Expand Up @@ -394,7 +398,11 @@ TImageInfo* CRenderEngine::LoadImage(STRINGorID bitmap, LPCTSTR type, DWORD mask
FILE_ATTRIBUTE_NORMAL, NULL);
if( hFile == INVALID_HANDLE_VALUE ) break;
dwSize = ::GetFileSize(hFile, NULL);
if( dwSize == 0 ) break;
if (dwSize == 0)
{
::CloseHandle(hFile);
break;
}

DWORD dwRead = 0;
pData = new BYTE[ dwSize ];
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
61.修复richedit里面的两处笔误;给richedit中CTxtWinHost类的成员变量名增加m_前缀<br />
62.引入官方库的关于List排序的修复<br />
63.引入官方库的关于List排序后选中错误的修复,同步关于SelectItem参数传递错误的修复,见https://github.com/duilib/duilib/pull/182<br />
64.引入官方库的修复UIRender某些情况下占用文件不释放的bug,见https://github.com/duilib/duilib/pull/186<br />

<br />
其他改动:<br />
1.修改了几处官方库中的笔误。<br />
Expand Down

0 comments on commit eec237f

Please sign in to comment.