From 8e041670e7b9c90cf6261f1c5326cda8a2c5274a Mon Sep 17 00:00:00 2001 From: "Mark Aherne (Faerdan)" Date: Thu, 9 Jan 2014 01:06:24 +0000 Subject: [PATCH] Minor fix for NanoUI * I was passing src instead of src_object in try_update_ui, this is fixed now. * Changed checks to use the isnul procl, just to be sure. --- code/modules/nano/nanomanager.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index d137b87351f..b7b45060bb7 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -26,11 +26,11 @@ * @return /nanoui Returns the found ui, for null if none exists */ /datum/nanomanager/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data) - if (!ui) // no ui has been passed, so we'll search for one + if (isnull(ui)) // no ui has been passed, so we'll search for one { - ui = get_open_ui(user, src, ui_key) + ui = get_open_ui(user, src_object, ui_key) } - if (ui) + if (!isnull(ui)) // The UI is already open so push the data to it ui.push_data(data) return ui