Unitialized buffer patch

Bug #959733 reported by Federico Ceratto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SquareMap
Fix Released
Undecided
Unassigned

Bug Description

Hi Mike,
Thank you for your work on SquareMap.
I'm the maintainer of its Debian package and I've just received a patch for it:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=664662

The patch is intended for version 1.0.1b3 and it's attached below

(thanks to Nicolas Boulenguez and the Task Coach developers)

Do you think the patch is useful for the current version? If so, do you plan to release a new version?

Thank you,
Federico

--- /usr/share/pyshared/squaremap/squaremap.py 2011-05-12 04:04:09.000000000 +0200
+++ taskcoachlib/thirdparty/squaremap/squaremap.py 2012-02-03 11:11:32.000000000 +0100
@@ -120,6 +120,7 @@
        self.highlight = highlight
        self.selectedNode = None
        self.highlightedNode = None
+ self._buffer = wx.EmptyBitmap(20, 20) # Have a default buffer ready
        self.Bind( wx.EVT_PAINT, self.OnPaint)
        self.Bind( wx.EVT_SIZE, self.OnSize )
        if highlight:
@@ -214,6 +215,8 @@
        # The buffer is initialized in here, so that the buffer is always
        # the same size as the Window.
        width, height = self.GetClientSizeTuple()
+ if width <= 0 or height <=0:
+ return
        # Make new off-screen bitmap: this bitmap will always have the
        # current drawing in it, so it can be used to save the image to
        # a file, or whatever.

Revision history for this message
Mike C. Fletcher (mcfletch) wrote : Re: [Bug 959733] [NEW] Unitialized buffer patch

On 12-03-19 05:43 PM, Federico Ceratto wrote:
> Public bug reported:
>
> Hi Mike,
> Thank you for your work on SquareMap.
> I'm the maintainer of its Debian package and I've just received a patch for it:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=664662
>
> The patch is intended for version 1.0.1b3 and it's attached below
>
> (thanks to Nicolas Boulenguez and the Task Coach developers)
>
> Do you think the patch is useful for the current version?
Certainly is. It was merged a few months ago.
> If so, do you
> plan to release a new version?
I hadn't actually thought to release one, but I can certainly do so
now. Okay, done. 1.0.1 final, with these changes, is now up on PyPI.

HTH, and thanks for your work,
Mike

--
________________________________________________
   Mike C. Fletcher
   Designer, VR Plumber, Coder
   http://www.vrplumber.com
   http://blog.vrplumber.com

Revision history for this message
Mike C. Fletcher (mcfletch) wrote :

Fix released a while ago.

Changed in squaremap:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.