From 04c97c176d01cb503cbbf4fcb012ce22d4311290 Mon Sep 17 00:00:00 2001 From: facelessuser Date: Wed, 26 Jul 2017 22:13:52 -0600 Subject: [PATCH] Fix reference before assignment Fix issue where textWidth can be referenced before it is actually assigned. --- wx/lib/agw/supertooltip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wx/lib/agw/supertooltip.py b/wx/lib/agw/supertooltip.py index 2b5beb97..5308979f 100644 --- a/wx/lib/agw/supertooltip.py +++ b/wx/lib/agw/supertooltip.py @@ -317,7 +317,7 @@ class ToolTipWindowBase(object): # We got the header text dc.SetFont(headerFont) textWidth, textHeight = dc.GetTextExtent(header) - maxWidth = max(bmpWidth+(textWidth+self._spacing*3), maxWidth) + maxWidth = max(bmpWidth+(textWidth+self._spacing*3), maxWidth) # Calculate the header height height = max(textHeight, bmpHeight) if header: