diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 1ae3b270a4..c76ecb52f5 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2882,6 +2882,8 @@ return if(SSdbcore.Connect()) var/datum/DBQuery/query_get_mentor = SSdbcore.NewQuery("SELECT id FROM [format_table_name("mentor")] WHERE ckey = '[ckey]'") + if(!query_get_mentor.warn_execute()) + return if(query_get_mentor.NextRow()) to_chat(usr, "[ckey] is already a mentor.") return