mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-07 18:07:27 +00:00
Fix some potential null derefs
This commit is contained in:
parent
faa02023ce
commit
f63468d783
@ -611,14 +611,16 @@ static bool init_video_pixel_converter(unsigned size)
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (video_driver_scaler_ptr->scaler_out)
|
|
||||||
free(video_driver_scaler_ptr->scaler_out);
|
|
||||||
if (video_driver_scaler_ptr->scaler)
|
|
||||||
free(video_driver_scaler_ptr->scaler);
|
|
||||||
if (video_driver_scaler_ptr)
|
if (video_driver_scaler_ptr)
|
||||||
free(video_driver_scaler_ptr);
|
{
|
||||||
|
if (video_driver_scaler_ptr->scaler_out)
|
||||||
|
free(video_driver_scaler_ptr->scaler_out);
|
||||||
|
if (video_driver_scaler_ptr->scaler)
|
||||||
|
free(video_driver_scaler_ptr->scaler);
|
||||||
|
|
||||||
video_driver_scaler_ptr = NULL;
|
free(video_driver_scaler_ptr);
|
||||||
|
video_driver_scaler_ptr = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -242,8 +242,10 @@ unsigned video_texture_load(void *data,
|
|||||||
static void video_texture_gl_unload(uintptr_t *id)
|
static void video_texture_gl_unload(uintptr_t *id)
|
||||||
{
|
{
|
||||||
if (id)
|
if (id)
|
||||||
|
{
|
||||||
glDeleteTextures(1, (const GLuint*)id);
|
glDeleteTextures(1, (const GLuint*)id);
|
||||||
*id = 0;
|
*id = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -56,8 +56,11 @@ static void print_buf_lines(file_list_t *list, char *buf, int buf_size,
|
|||||||
int i, j = 0;
|
int i, j = 0;
|
||||||
char *line_start = buf;
|
char *line_start = buf;
|
||||||
|
|
||||||
if (!buf)
|
if (!buf || !buf_size)
|
||||||
|
{
|
||||||
menu_entries_push(list, "No entries to display.", "", MENU_FILE_NONE, 0, 0);
|
menu_entries_push(list, "No entries to display.", "", MENU_FILE_NONE, 0, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < buf_size; i++)
|
for (i = 0; i < buf_size; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user