shithub: m8c

Download patch

ref: 32e0c562a8085b6f0018395173555f0ae91feedb
parent: b2cdb2a885b586f771b1c5ee8b6feecca998dbd0
author: Jeff Alyanak <jeff@alyanak.ca>
date: Sat Oct 2 12:59:29 EDT 2021

Properly check for missing config

All options will simply be left at default.

--- a/main.c
+++ b/main.c
@@ -31,6 +31,10 @@
 void read_config() {
   // Load the config and read the fullscreen setting from the graphics section
   ini_t *config = ini_load("config.ini");
+  if (config == NULL) {
+    return;
+  }
+
   const char *setting_fullscren = ini_get(config, "graphics", "fullscreen");
   // Other settings could be read here, too.
 
--