prevent crash when no settings
This commit is contained in:
		| @@ -863,6 +863,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen | |||||||
| 			} | 			} | ||||||
| 			$allsettings = $this->maniaControl->getSettingManager()->getSettingsByClass($this); | 			$allsettings = $this->maniaControl->getSettingManager()->getSettingsByClass($this); | ||||||
| 			$settingsmode = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_SETTINGS_MODE); | 			$settingsmode = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_SETTINGS_MODE); | ||||||
|  | 			if ($allsettings !== null && $settingsmode !== null) { | ||||||
| 				$modesettings = $this->getModeSettings($settingsmode); | 				$modesettings = $this->getModeSettings($settingsmode); | ||||||
| 				foreach ($allsettings as $key => $value) { | 				foreach ($allsettings as $key => $value) { | ||||||
| 					$name = $value->setting; | 					$name = $value->setting; | ||||||
| @@ -898,6 +899,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen | |||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Load Gamemode settings excluding not used settings in custom gamemodes | 	 * Load Gamemode settings excluding not used settings in custom gamemodes | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user