(Lakka) Prevent some more segfault bugs

This commit is contained in:
twinaphex 2014-05-27 03:48:08 +02:00
parent 7acf7e706d
commit ebfb104986
2 changed files with 19 additions and 4 deletions

View File

@ -39,11 +39,20 @@
static int menu_lakka_iterate(void *data, unsigned action)
{
rgui_handle_t *rgui = (rgui_handle_t*)data;
menu_category_t *active_category = (menu_category_t*)&categories[menu_active_category];
menu_item_t *active_item = (menu_item_t*)&active_category->items[active_category->active_item];
rgui_handle_t *rgui;
menu_category_t *active_category;
menu_item_t *active_item;
if (!active_category)
rgui = (rgui_handle_t*)data;
active_category = NULL;
active_item = NULL;
active_category = (menu_category_t*)&categories[menu_active_category];
if (active_category)
active_item = (menu_item_t*)&active_category->items[active_category->active_item];
if (!active_category || !active_item)
return 0;
if (driver.video_data && driver.menu_ctx && driver.menu_ctx->set_texture)

View File

@ -143,6 +143,12 @@ static void update_tween(void *data, float dt)
if (!tween)
return;
#if 0
RARCH_LOG("delta: %f\n", dt);
RARCH_LOG("tween running since: %f\n", tween->running_since);
RARCH_LOG("tween duration: %f\n", tween->duration);
#endif
if (tween->running_since < tween->duration)
{
tween->running_since += dt;