Skip to content

Commit

Permalink
fix(notification-manager): Prevent errors on faulty call
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinFunk committed Apr 25, 2017
1 parent 3e5be38 commit 37da8cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/ps2/client/notifications/cl_KNotificationPanelManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ function PANEL:Think( )
self.panelSlidingIn = table.remove( self.notificationsWaiting, 1 ) --Dequeue
self.panelSlidingIn:SetParent( self )
self.panelSlidingIn:SetVisible( true )
if not self.panelSlidingIn.duration or not isnumber(self.panelSlidingIn.duration) then
KLogf(2, "KNotification Manager: got duration %s", tostring(self.panelSlidingIn.duration))
self.panelSlidingIn.duration = 15
end
self.panelSlidingIn.slideOutStart = CurTime( ) + self.panelSlidingIn.duration + self.slideInDuration
self.slidingStarted = CurTime( )
table.insert( self.notifications, self.panelSlidingIn )
Expand Down

0 comments on commit 37da8cd

Please sign in to comment.