Bug 2529

Summary: crash in mimeview_start_drag after deleting message
Product: Claws Mail (GTK 2) Reporter: Michael Schwendt <mschwendt>
Component: UI/Message ViewAssignee: users
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 3.7.10   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
possible fix none

Description Michael Schwendt 2011-10-24 15:24:53 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=748384#c4
Backtrace: https://bugzilla.redhat.com/attachment.cgi?id=529776

Originally reported about 3.7.9, reproducable with 3.7.10:

1. put a single message into a local folder, a normal text/plain one will suffice
2. select the message
3. open the mimeview parts viewer with the '<' button right of the message view
4. drag'n'drop a part other than the first one (message/rfc822) to somewhere, e.g. drag the text/plain part into an editor/filemanager
5. Trash/delete the message
6. try drag'n'drop in the _empty_ mimeview parts window area -> crash

There may be other/similar test-cases, which would also lead to mimeview_start_drag running into a NULL ptr.
Comment 1 Ricardo Mones 2011-10-25 01:33:31 UTC
Created attachment 1034 [details]
possible fix

This untested patch may fix the issue, as done in other invocations of mimeview_get_selected_part.
Comment 2 users 2011-10-25 07:42:35 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.colino.net/claws-mail/

2011-10-25 [colin]	3.7.10cvs47

	* src/mimeview.c
		Fix bug #2529, 'crash in mimeview_start_drag after
		deleting message'. Patch by Ricardo