Haiku: use SDL_malloc

main
Sylvain 2021-11-22 16:44:48 +01:00 committed by Sam Lantinga
parent 79b37cc55f
commit c3633d2c99
1 changed files with 3 additions and 3 deletions

View File

@ -124,7 +124,7 @@ class SDL_BWin:public BDirectWindow
#ifdef DRAWTHREAD
wait_for_thread(_draw_thread_id, &result);
#endif
free(_clips);
SDL_free(_clips);
delete _buffer_locker;
}
@ -184,14 +184,14 @@ class SDL_BWin:public BDirectWindow
if (info->clip_list_count > _num_clips)
{
if(_clips) {
free(_clips);
SDL_free(_clips);
_clips = NULL;
}
}
_num_clips = info->clip_list_count;
if (_clips == NULL)
_clips = (clipping_rect *)malloc(_num_clips*sizeof(clipping_rect));
_clips = (clipping_rect *)SDL_malloc(_num_clips*sizeof(clipping_rect));
if(_clips) {
SDL_memcpy(_clips, info->clip_list,
_num_clips*sizeof(clipping_rect));