Menu

#948 Crash when moving up a menu item with wxSmith

Next_Nightly
applied
wxSmith (61)
Patch
2020-04-20
2020-04-15
No

A forum message reports a crash when editing a menu with wxSmith. The message is from 2014, but the issue is still there.

The steps to reproduce are:

  • Create a wxWidgets project, frame based
  • When project opens, double click on MenuBar editor
  • Select the 'About' child menu item
  • Click on the ^ button to move it up - C::B crashes

The crash is due to a bad rechaining of the moved item in the tree. The attached patch fixes this.

1 Attachments

Discussion

  • bluehazzard

    bluehazzard - 2020-04-16

    Thank you for the patch.
    @devs: are we using "NULL" or "nullptr"?

     
  • bluehazzard

    bluehazzard - 2020-04-16
    • status: open --> pending
    • assigned_to: bluehazzard
     
  • Miguel Gimenez

    Miguel Gimenez - 2020-04-16

    Looks like nullptr is preferred, see r12001 for example. I have changed the patch to use nullptr instead of 0 in the whole file.

     

    Last edit: Miguel Gimenez 2020-04-17
  • Teodor Petrov

    Teodor Petrov - 2020-04-16

    nullptr, we had this even in the pre-c++11 days, and I have to remove it (see nullptr.h/cpp) :)

     
  • bluehazzard

    bluehazzard - 2020-04-20
    • status: pending --> applied
     
  • bluehazzard

    bluehazzard - 2020-04-20

    in [r12068]
    Thank you for your work!

     

    Related

    Commit: [r12068]


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.