Skip to content

Commit

Permalink
Fix a crash, reinitialize rawImage for every image.
Browse files Browse the repository at this point in the history
Summary:
We've been crashing since we removed the initialization of the rawImage QImage.
Going back to the way it was previously.

Reviewers: mutlaqja

Reviewed By: mutlaqja

Subscribers: kde-edu

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D26933
  • Loading branch information
murveit authored and knro committed Jan 27, 2020
1 parent 706324d commit 7c1264a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions kstars/fitsviewer/fitsview.cpp
Expand Up @@ -1552,11 +1552,6 @@ void FITSView::initDisplayImage()
int w = (imageData->width() + sampling - 1) / sampling;
int h = (imageData->height() + sampling - 1) / sampling;

if (!rawImage.isNull() && rawImage.width() == w && rawImage.height() == h &&
(((rawImage.format() == QImage::Format_Indexed8) && (imageData->channels() == 1)) ||
((rawImage.format() == QImage::Format_RGB32) && (imageData->channels() == 3))))
return;

if (imageData->channels() == 1)
{
rawImage = QImage(w, h, QImage::Format_Indexed8);
Expand Down

0 comments on commit 7c1264a

Please sign in to comment.