Skip to content

Commit

Permalink
booru/image: nullcheck loader and move pixbuf assignment inside cance…
Browse files Browse the repository at this point in the history
…l check
  • Loading branch information
ahodesuka committed Nov 21, 2017
1 parent a5d5b22 commit ff91eb9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/booru/image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void Image::load_pixbuf()
{
AhoViewer::Image::load_pixbuf();
}
else if (!start_download() && !m_isWebM && m_Loader->get_animation())
else if (!start_download() && !m_isWebM && m_Loader && m_Loader->get_animation())
{
m_Pixbuf = m_Loader->get_animation();
}
Expand Down Expand Up @@ -209,10 +209,11 @@ void Image::on_area_prepared()
}
m_ThumbnailLock.reader_unlock();

m_Pixbuf = m_Loader->get_animation();

if (!m_Curler.is_cancelled())
{
m_Pixbuf = m_Loader->get_animation();
m_SignalPixbufChanged();
}
}

void Image::on_area_updated(int, int, int, int)
Expand Down

0 comments on commit ff91eb9

Please sign in to comment.