Add warning to rom_history_init if it early exits

This commit is contained in:
Twinaphex 2014-07-21 05:00:13 +02:00
parent 65f78b6729
commit 0e9ea0055c
1 changed files with 3 additions and 0 deletions

View File

@ -212,7 +212,10 @@ rom_history_t *rom_history_init(const char *path, size_t size)
{ {
rom_history_t *hist = (rom_history_t*)calloc(1, sizeof(*hist)); rom_history_t *hist = (rom_history_t*)calloc(1, sizeof(*hist));
if (!hist) if (!hist)
{
RARCH_ERR("Cannot initialize content history.\n")
return NULL; return NULL;
}
hist->entries = (struct rom_history_entry*)calloc(size, sizeof(*hist->entries)); hist->entries = (struct rom_history_entry*)calloc(size, sizeof(*hist->entries));
if (!hist->entries) if (!hist->entries)