Don't crash when removing last account
ClosedPublic

Authored by ahunt on Feb 9 2017, 3:46 AM.

Details

Summary

Under certain circumstances, removing the last (or only) remaining account
causes kube to crash.

Steps to reproduce:

  1. clear all sink config folders
  2. start kube, add a generic IMAP account
  3. close kube, reopen kube
  4. open accounts list, select "edit"
  5. Select "Delete" -> kube crashes

Diff Detail

Repository
R162 Kube
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahunt updated this revision to Diff 11095.Feb 9 2017, 3:46 AM
ahunt retitled this revision from to Don't crash when removing last account.
ahunt updated this object.
ahunt edited the test plan for this revision. (Show Details)
ahunt added a reviewer: Kube.
ahunt added a comment.Feb 9 2017, 3:48 AM

I don't really understand this code well enough to know if this fix is correct. setCurrentIndex() is being called with i=-1, but I've got no idea where that originates yet.

cmollekopf accepted this revision.Feb 11 2017, 2:14 PM
cmollekopf added a reviewer: cmollekopf.
cmollekopf added a subscriber: cmollekopf.

Once the indentation is fixed feel free to push the patch or let me know if I should do it for you.

Thanks for the patch!

framework/domain/selector.h
44

Indentation

This revision is now accepted and ready to land.Feb 11 2017, 2:14 PM
aacid requested changes to this revision.Feb 27 2017, 12:03 AM
aacid added a subscriber: aacid.

Is it me or there's no framework/domain/selector.h file anymore?

This revision now requires changes to proceed.Feb 27 2017, 12:03 AM
This revision was automatically updated to reflect the committed changes.
In D4517#90320, @aacid wrote:

Is it me or there's no framework/domain/selector.h file anymore?

We're working in the develop branch.