Skip to content

Commit b71a631

Browse files
committed
Fix null skillset runtimes on new_player
1 parent 3fce33c commit b71a631

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

code/datums/mind/mind.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
assigned_job = job
226226
assigned_role = job.title
227227
role_alt_title = new_role
228-
if(current)
228+
if(current?.skillset)
229229
current.skillset.obtain_from_client(job, current.client)
230230

231231
else if (href_list["amb_edit"])

code/modules/client/preference_setup/occupation/occupation.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
skill_link = "<a href='byond://?src=\ref[src];set_skills=[title]'>View Skills</a>"
186186
skill_link = "<td>[skill_link]</td>"
187187

188-
if(!user.skillset.skills_transferable)
188+
if(!user.skillset?.skills_transferable)
189189
skill_link = ""
190190

191191
// Begin assembling the actual HTML.

code/modules/mob/skills/skillset.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var/global/list/all_skill_verbs
3838
. += SB.buffs[skill_path]
3939

4040
/datum/skillset/proc/obtain_from_mob(mob/living/mob)
41-
if(!istype(mob) || !skills_transferable || !mob.skillset.skills_transferable)
41+
if(!istype(mob) || !skills_transferable || !mob.skillset?.skills_transferable)
4242
return
4343
skill_list = mob.skillset.skill_list
4444
default_value = mob.skillset.default_value

0 commit comments

Comments
 (0)