Fix Handle leak in windows platform
Also fix a typo in my previous commit :|
This commit is contained in:
parent
264891de8d
commit
4a8265048d
|
@ -296,7 +296,7 @@ lister_render(Application_Links *app, Frame_Info frame_info, View_ID view){
|
||||||
y_pos += first_index*block_height;
|
y_pos += first_index*block_height;
|
||||||
|
|
||||||
i32 max_count = first_index + lister->visible_count + 3;
|
i32 max_count = first_index + lister->visible_count + 3;
|
||||||
count = clamp_to(lister->filtered.count, max_count);
|
count = clamp_top(lister->filtered.count, max_count);
|
||||||
|
|
||||||
for (i32 i = first_index; i < count; i += 1){
|
for (i32 i = first_index; i < count; i += 1){
|
||||||
Lister_Node *node = lister->filtered.node_ptrs[i];
|
Lister_Node *node = lister->filtered.node_ptrs[i];
|
||||||
|
|
|
@ -335,6 +335,7 @@ system_get_file_list_sig(){
|
||||||
result.infos[counter] = node;
|
result.infos[counter] = node;
|
||||||
counter += 1;
|
counter += 1;
|
||||||
}
|
}
|
||||||
|
FindClose(search);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(result);
|
return(result);
|
||||||
|
@ -474,7 +475,7 @@ color_picker_hook(HWND Window, UINT Message, WPARAM WParam, LPARAM LParam){
|
||||||
if(GetDlgCtrlID(swatch_window) == 0x2c5)
|
if(GetDlgCtrlID(swatch_window) == 0x2c5)
|
||||||
{
|
{
|
||||||
CHOOSECOLORW *win32_params =
|
CHOOSECOLORW *win32_params =
|
||||||
(CHOOSECOLORW *)GetWindowLongPtr(Window, GWLP_USERDATA);
|
(CHOOSECOLORW *)GetWindowLongPtr(Window, GWLP_USERDATA);
|
||||||
if(win32_params)
|
if(win32_params)
|
||||||
{
|
{
|
||||||
Color_Picker *picker = (Color_Picker*)win32_params->lCustData;
|
Color_Picker *picker = (Color_Picker*)win32_params->lCustData;
|
||||||
|
|
Loading…
Reference in New Issue