Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash in QgsNetworkContentFetcherRegistry
  • Loading branch information
nyalldawson committed May 31, 2018
1 parent 37b06bc commit e8515d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Expand Up @@ -39,6 +39,7 @@ FetchedContent holds useful information about a network content being fetched
%Docstring
Constructs a FetchedContent with pointer to the downloaded file and status of the download
%End

~QgsFetchedContent();


Expand Down
9 changes: 7 additions & 2 deletions src/core/qgsnetworkcontentfetcherregistry.h
Expand Up @@ -55,11 +55,16 @@ class CORE_EXPORT QgsFetchedContent : public QObject

//! Constructs a FetchedContent with pointer to the downloaded file and status of the download
explicit QgsFetchedContent( const QString &url, QTemporaryFile *file = nullptr, ContentStatus status = NotStarted )
: QObject(), mUrl( url ), mFile( file ), mStatus( status ) {}
: QObject()
, mUrl( url )
, mFile( file )
, mStatus( status )
{}

~QgsFetchedContent()
{
mFile->close();
if ( mFile )
mFile->close();
delete mFile;
}

Expand Down

0 comments on commit e8515d8

Please sign in to comment.