URL: 
https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f0fed342165145461ed88358d2fc8985d15f3745
Submitter: Roland Knall (rkn...@gmail.com)
Changed: branch: master
Repository: wireshark

Commits:

f0fed34 by Martin Kaiser (wiresh...@kaiser.cx):

    main window: don't keep a dangling freeze_focus_ pointer
    
    Without this fix, Wireshark crashes when the user presses Ctrl-D or
    selects Edit / Ignore Packet and the current focus is somewhere on the
    bytes view.
    
    To ignore a packet, we protect the actual ignore operation by calling
    main window's freeze and thaw methods. We save a pointer freeze_focus_,
    pointing to the widget that has the focus, and restore the focus during
    thaw.
    
    This causes a crash if the focused widget is part of ByteViewTab.
    Ignoring the packet causes a redissection, the ByteViewTab and its
    children are cleared. freeze_focus_ remains non-NULL but doesn't point
    to a valid QWdiget any more. Calling freeze_focus_->setFocus() crashes.
    
    Fix this by using a QPointer<QWdiget> for freeze_focus_. The pointer is
    then reset to NULL when the QWdiget that it points to goes out of scope.
    
    Change-Id: Icc1f71a9de971284c628b7815a7fc1a5cc0d5fe2
    Reviewed-on: https://code.wireshark.org/review/26693
    Reviewed-by: Martin Kaiser <wiresh...@kaiser.cx>
    Petri-Dish: Martin Kaiser <wiresh...@kaiser.cx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Peter Wu <pe...@lekensteyn.nl>
    Reviewed-by: Roland Knall <rkn...@gmail.com>
    

Actions performed:

    from  55f6f65   CMake: More Qt4 removal.
    adds  f0fed34   main window: don't keep a dangling freeze_focus_ pointer


Summary of changes:
 ui/qt/main_window.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
___________________________________________________________________________
Sent via:    Wireshark-commits mailing list <wireshark-commits@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-commits
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-commits
             mailto:wireshark-commits-requ...@wireshark.org?subject=unsubscribe

Reply via email to