mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed possible crash in DetailsDialog::setFileHash by checking return value of dynamic_cast.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8596 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
865a45f294
commit
8691a911aa
@ -101,7 +101,10 @@ DetailsDialog::show()
|
|||||||
|
|
||||||
void DetailsDialog::setFileHash(const RsFileHash & hash)
|
void DetailsDialog::setFileHash(const RsFileHash & hash)
|
||||||
{
|
{
|
||||||
dynamic_cast<FileTransferInfoWidget*>(ui.fileTransferInfoWidget->widget())->setFileHash(hash) ;
|
FileTransferInfoWidget *ftiWidget = dynamic_cast<FileTransferInfoWidget*>(ui.fileTransferInfoWidget->widget());
|
||||||
|
if (ftiWidget) {
|
||||||
|
ftiWidget->setFileHash(hash) ;
|
||||||
|
}
|
||||||
|
|
||||||
FileInfo nfo ;
|
FileInfo nfo ;
|
||||||
if(!rsFiles->FileDetails(hash, RS_FILE_HINTS_DOWNLOAD, nfo))
|
if(!rsFiles->FileDetails(hash, RS_FILE_HINTS_DOWNLOAD, nfo))
|
||||||
|
Loading…
Reference in New Issue
Block a user