Skip to content

Commit

Permalink
Added small fixes and asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
Usaga committed Mar 30, 2016
1 parent 4c71fab commit 16236a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/downloader/prdownloader.cpp
Expand Up @@ -157,12 +157,15 @@ class DownloadItem : public LSL::WorkItem
void PrDownloader::GetProgress(DownloadProgress& progress)
{
assert(wxThread::IsMain());
if (m_progress == nullptr)
if (m_progress == nullptr) {
assert(!"m_progress == nullptr");
return;
}
//TODO: add mutex
progress.name = m_progress->name;
progress.downloaded = m_progress->downloaded;
progress.filesize = m_progress->filesize;

wxLogDebug("%s %d %d", progress.name.c_str(), progress.downloaded, progress.filesize);
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/taskbar.cpp
Expand Up @@ -120,7 +120,7 @@ void TaskBar::UpdateProgress()
prDownloader().GetProgress(p);

int progress = (int)p.GetProgressPercent();
text->SetLabel(wxString::Format(_("Downloading %s"), p.name));
text->SetLabel(wxString::Format(_("Downloading %s"), TowxString(p.name)));
gauge->SetValue(progress);
}

Expand Down

0 comments on commit 16236a2

Please sign in to comment.