Skip to content

Commit 6cf08ec

Browse files
committed
Safety check
1 parent 9b0b661 commit 6cf08ec

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ void libretro_chailove_pntr_set_error(int error) {
4646

4747
bool Init(pntr_app* app) {
4848
ChaiLove::environ_cb = pntr_app_libretro_environ_cb(app);
49+
if (ChaiLove::environ_cb == NULL) {
50+
pntr_app_log(PNTR_APP_LOG_ERROR, "[ChaiLove] Environment callback not set");
51+
return false;
52+
}
4953

5054
// Initialize PhysFS
5155
if (PHYSFS_init((const char*)ChaiLove::environ_cb) == 0) {

0 commit comments

Comments
 (0)