URL:
  <http://gna.org/bugs/?22511>

                 Summary: Sdl-clients use color that's no longer in scope
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Sun 24 Aug 2014 02:07:42 AM EEST
                Category: client-sdl2
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.4.4, 2.5.0-beta2, 2.6.0

    _______________________________________________________

Details:

If resize_window() gets NULL color as parameter, it gets theme default
background color to local variable and tries to use that instead.
Unfortunately the local variable scope is inside the block it gets assigned
to, and pointer to it, used later is thus invalid.

As a result many dialogs have their background in wrong color (I've only seen
totally transparent ones, but I don't think that's any way guaranteed)

Fix attached. Note that simple fix would have been just to drop the local
variable from between, but I wanted to keep it for future adjustments (I
wonder if it would make sense to have less than 100% alpha, those callers who
really want solid color can easily pass color from theme themselves instead of
NULL)



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 24 Aug 2014 02:07:42 AM EEST  Name: ResizeWindowDefaultColor.patch 
Size: 2kB   By: cazfi

<http://gna.org/bugs/download.php?file_id=21812>
-------------------------------------------------------
Date: Sun 24 Aug 2014 02:07:42 AM EEST  Name:
ResizeWindowDefaultColor-S2_5.patch  Size: 1014B   By: cazfi

<http://gna.org/bugs/download.php?file_id=21813>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?22511>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to