summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-wxgui/python/wxgui/plotter/gltext.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gr-wxgui/python/wxgui/plotter/gltext.py b/gr-wxgui/python/wxgui/plotter/gltext.py
index 0b6e3f55b3..55627bceb1 100644
--- a/gr-wxgui/python/wxgui/plotter/gltext.py
+++ b/gr-wxgui/python/wxgui/plotter/gltext.py
@@ -149,6 +149,10 @@ class TextElement(object):
# get a memory dc
dc = wx.MemoryDC()
+ # Select an empty bitmap into the MemoryDC - otherwise the call to
+ # GetMultiLineTextExtent() may fail below
+ dc.SelectObject(wx.EmptyBitmap(1,1))
+
# set our font
dc.SetFont(self._font)