Skip to content

Commit 32084cf

Browse files
authored
Merge pull request scp-fs2open#7012 from Shivansps/check-mod-nullptr
Fix crashing if mod uses custom hud gauge and no -mod cmdline is passed
2 parents c50cffa + 7a75aaa commit 32084cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/hud/hudconfig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,7 @@ SCP_string create_custom_gauge_id(const SCP_string& gauge_name) {
20352035
Assertion(!gauge_name.empty(), "Custom gauge has no name!");
20362036

20372037
SCP_string id;
2038-
if (Mod_title.empty()) {
2038+
if (Mod_title.empty() && Cmdline_mod != nullptr) {
20392039
id = Cmdline_mod;
20402040

20412041
// Basic cleanup attempt

0 commit comments

Comments
 (0)