Skip to content

Commit

Permalink
Haiku: use SDL_malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl authored and slouken committed Nov 22, 2021
1 parent 79b37cc commit c3633d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/video/haiku/SDL_BWin.h
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit c3633d2

Please sign in to comment.