Skip to content
Permalink
Browse files

[GRASS] fix crash in browser when opening GRASS 6 mapset with GRASS 7

  • Loading branch information
blazek committed Apr 1, 2015
1 parent 8a43e90 commit d8bd20e52c85f7bd58321cba8d7d631f58e262d4
Showing with 2 additions and 7 deletions.
  1. +2 −7 src/providers/grass/qgsgrass.cpp
@@ -433,13 +433,8 @@ int QgsGrass::error_routine( const char *msg, int fatal )
//throw QgsGrass::Exception( QString::fromUtf8( msg ) );
lastError = FATAL;

#if (GRASS_VERSION_MAJOR == 7) && (GRASS_VERSION_MINOR == 0)
// G_fatal_error in GRASS 7.0.0beta1 always exits the second time it is called. This was fixed in 7.1.
QMessageBox::warning( 0, QObject::tr( "Warning" ), QObject::tr( "Fatal error occurred in GRASS library. QGIS gets over the error but any next fatal error will cause QGIS exit without warning. This is a problem of GRASS 7.0.0beta1 but it is fixed in GRASS 7.1 and higher. Error message: %1" ).arg( msg ) );
#endif

#if (GRASS_VERSION_MAJOR < 7) || (GRASS_VERSION_MAJOR == 7 && GRASS_VERSION_MINOR == 0)
// longjump() is called by G_fatal_error in GRASS >= 7.1
#if (GRASS_VERSION_MAJOR < 7)
// longjump() is called by G_fatal_error in GRASS >= 7
longjmp( QgsGrass::jumper, 1 );
#endif
}

0 comments on commit d8bd20e

Please sign in to comment.
You can’t perform that action at this time.