1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-03-10 13:44:37 +00:00

cocoa: fix crash on load results

During createResultsWindow(), we would initialize the details panel too late.

fixes #380
This commit is contained in:
Virgil Dupras 2016-08-14 20:31:14 -04:00
parent 5be9d537a5
commit 28d2aa8197

View File

@ -352,8 +352,12 @@ http://www.gnu.org/licenses/gpl-3.0.html
if (_detailsPanel != nil) { if (_detailsPanel != nil) {
[_detailsPanel release]; [_detailsPanel release];
} }
_resultWindow = [[ResultWindow alloc] initWithParentApp:self]; // Warning: creation order is important
// If the details panel is not created first and that there are some results in the model
// (happens if we load results), a dupe selection event triggers a details refresh in the
// core before we have the chance to initialize it, and then we crash.
_detailsPanel = [self createDetailsPanel]; _detailsPanel = [self createDetailsPanel];
_resultWindow = [[ResultWindow alloc] initWithParentApp:self];
} }
- (void)showResultsWindow - (void)showResultsWindow
{ {