2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Add some debug information for crashes.

This commit is contained in:
John Preston
2018-01-01 23:23:18 +03:00
parent 9c72470c17
commit 3325106837
2 changed files with 8 additions and 0 deletions

View File

@@ -3028,12 +3028,18 @@ void MediaView::findCurrent() {
? (_index | func::add(*_sharedMediaData->skippedBefore()))
: base::none;
_fullCount = _sharedMediaData->fullCount();
if (_index) {
Assert(*_index >= 0 && *_index < _sharedMediaData->size());
}
} else if (_userPhotosData) {
_index = _photo ? _userPhotosData->indexOf(_photo->id) : base::none;
_fullIndex = _userPhotosData->skippedBefore()
? (_index | func::add(*_userPhotosData->skippedBefore()))
: base::none;
_fullCount = _userPhotosData->fullCount();
if (_index) {
Assert(*_index >= 0 && *_index < _userPhotosData->size());
}
} else {
_index = _fullIndex = _fullCount = base::none;
}