-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Followup to d897aa5; fix crash on Mac
- Loading branch information
Showing
1 changed file
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9837f43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to revert this in 445675a because the method is intentionally called with invalid proxyIndex (for root). I don't see any problem in this method because it is legal to call rowCount() and index() with invalid index and item pointer is checked.
Was it really crashing in this method? Maybe it was crashing the next time qgis was started and browser tried to expand paths? Can you post backtrace?
9837f43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @blazek,
The app crashes on startup. Here is the related bits of the trace:
I substituted the following (to check if the index's internal pointer is not 0 instead) and it avoids the startup crash:
Does that work out OK for your implementation, instead?
9837f43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
internalPointer() won't help because invalid index has null internalPointer().
It seems however that hideEvent() is called before showEvent() on Mac. mModel and mProxyModel are created in showEvent(). I added checks in 4fde34a.
9837f43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blazek I can confirm here that 4fde34a does fix the startup crash. Thanks!