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

                 Summary: GUI2 listbox empty label crash
                 Project: Battle for Wesnoth
            Submitted by: zaroth
            Submitted on: Sun 10 Apr 2011 10:13:01 AM GMT
                Category: Bug
                Severity: 2 - Minor
                Priority: 5 - Normal
              Item Group: User Interface
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: r49151
        Operating System: Gentoo

    _______________________________________________________

Details:

When I was hacking together this patch https://gna.org/patch/?2625 I noticed
that adding a label to a listbox with both empty id and label text caused MP
game to crash with following error message:

Condition 'static_cast<int>(h) >= 0' failed at
/wesnoth-git/src/gui/auxiliary/canvas.cpp:1042 in function 'draw'. Extra
development information: Image 'misc/selection2-border-left.png', h = -10.

The listbox in question was the nick list from the linked patch. Usage in
that case was probably something along the lines of:

std::map<std::string, string_map> data;
string_map item;
item["id"] = "";
item["label"] = "";
data.insert(std::make_pair("nick", item));
nicks_listbox->add_row(data);




    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to