Skip to content

Commit

Permalink
[Server 3.0] strict check for QgsApplication
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Sep 25, 2016
1 parent aeb5ff2 commit b46d337
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/qgsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ bool QgsServer::sCaptureOutput = true;

QgsServer::QgsServer( bool captureOutput )
{
// Must be already instanciated
if ( qApp == nullptr )
// QgsApplication must exist
if ( qobject_cast<QgsApplication*>( qApp ) == nullptr )
{
qFatal( "A QgsApplication must exist before a QgsServer instance can be created." );
abort();
}
sCaptureOutput = captureOutput;
Expand Down

0 comments on commit b46d337

Please sign in to comment.