From f6a446a0ea528516c45cc218a52d08fbef29afec Mon Sep 17 00:00:00 2001 From: Valentin Funk Date: Sun, 14 Jan 2018 19:19:00 +0100 Subject: [PATCH] fix: Fix a lua error if receiving many item notifications in quick succession --- .../client/notifications/cl_DItemReceivedNotification.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/ps2/client/notifications/cl_DItemReceivedNotification.lua b/lua/ps2/client/notifications/cl_DItemReceivedNotification.lua index e3ada8a0..1df3fff2 100644 --- a/lua/ps2/client/notifications/cl_DItemReceivedNotification.lua +++ b/lua/ps2/client/notifications/cl_DItemReceivedNotification.lua @@ -22,7 +22,10 @@ function PANEL:SetItem( item ) self.infoPnl:Dock( TOP ) self.infoPnl.Paint = function( ) end function self.infoPnl:PerformLayout( ) - self.desc:DockMargin( self.icon:GetWide() + 10, 5, 0, 5 ) + if IsValid(self.desc) then + self.desc:DockMargin( self.icon:GetWide() + 10, 5, 0, 5 ) + end + self:SizeToChildren( false, true ) end