From 9e295eccd43ad591a34157880537d57a123cde42 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 16 Feb 2014 15:24:35 +0100 Subject: [PATCH] (PSP) Check if input and input_data points to something in graphics init function --- psp1/psp1_video.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/psp1/psp1_video.c b/psp1/psp1_video.c index 5c3c89f2b4..5489ea07b1 100644 --- a/psp1/psp1_video.c +++ b/psp1/psp1_video.c @@ -100,9 +100,12 @@ static void *psp_init(const video_info_t *video, if (!psp) goto error; - pspinput = input_psp.init(); - *input = pspinput ? &input_psp : NULL; - *input_data = pspinput; + if (input && input_data) + { + pspinput = input_psp.init(); + *input = pspinput ? &input_psp : NULL; + *input_data = pspinput; + } init_texture(psp, video);