diff --git a/discord/discord.c b/discord/discord.c index 387a5b6cbb..7336fb5ad5 100644 --- a/discord/discord.c +++ b/discord/discord.c @@ -74,7 +74,6 @@ static void handle_discord_join_request(const DiscordUser* request) void discord_update(enum discord_presence presence) { - rarch_system_info_t *system = runloop_get_system_info(); core_info_t *core_info = NULL; if (!discord_ready) diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index a4f2c55267..48db5e2508 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -2228,10 +2228,16 @@ static void vulkan_set_osd_msg(void *data, static uintptr_t vulkan_load_texture(void *video_data, void *data, bool threaded, enum texture_filter_type filter_type) { + struct vk_texture *texture = NULL; vk_t *vk = (vk_t*)video_data; struct texture_image *image = (struct texture_image*)data; - struct vk_texture *texture = (struct vk_texture*)calloc(1, sizeof(*texture)); - if (!image || !texture) + if (!image) + return 0; + + texture = (struct vk_texture*) + calloc(1, sizeof(*texture)); + + if (!texture) return 0; if (!image->pixels || !image->width || !image->height)