mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-08 03:20:22 +00:00
Merge pull request #1253 from lioncash/null
Add/fix some trivial null checks
This commit is contained in:
commit
319ba3f5c8
@ -44,6 +44,9 @@ static void rxml_free_node(struct rxml_node *node)
|
||||
struct rxml_node *head = NULL;
|
||||
struct rxml_attrib_node *attrib_node_head = NULL;
|
||||
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
for (head = node->children; head; )
|
||||
{
|
||||
struct rxml_node *next_node = (struct rxml_node*)head->next;
|
||||
|
@ -1464,6 +1464,9 @@ static void d3d_overlay_enable(void *data, bool state)
|
||||
unsigned i;
|
||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||
|
||||
if (!d3d)
|
||||
return;
|
||||
|
||||
for (i = 0; i < d3d->overlays.size(); i++)
|
||||
d3d->overlays_enabled = state;
|
||||
|
||||
|
@ -91,13 +91,13 @@ static void lakka_draw_text(lakka_handle_t *lakka,
|
||||
const char *str, float x,
|
||||
float y, float scale_factor, float alpha)
|
||||
{
|
||||
if (!lakka)
|
||||
return;
|
||||
|
||||
if (alpha > lakka->global_alpha)
|
||||
alpha = lakka->global_alpha;
|
||||
uint8_t a8 = 255 * alpha;
|
||||
|
||||
if (!lakka)
|
||||
return;
|
||||
|
||||
if (a8 == 0)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user