From 248d985ae6a1f9318cd18bd34c73e31418ebd71c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Mar 2015 00:43:10 +0100 Subject: [PATCH] Don't call driver_get_ptr until after call to rarch_main_state_alloc has been made --- frontend/frontend.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/frontend.c b/frontend/frontend.c index eb847bb44e..6bdfe4babc 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -279,13 +279,15 @@ returntype main_entry(signature()) { declare_argc(); declare_argv(); - args_type() args = (args_type())args_initial_ptr(); - int ret = 0; + args_type() args = (args_type())args_initial_ptr(); + int ret = 0; settings_t *settings = NULL; - driver_t *driver = driver_get_ptr(); - + driver_t *driver = NULL; + rarch_main_state_alloc(); + driver = driver_get_ptr(); + if (driver) driver->frontend_ctx = (frontend_ctx_driver_t*)frontend_ctx_init_first();