Skip to content

Commit af6f467

Browse files
committedOct 8, 2015
[GRASS] fixed deadlock when started from GRASS shell
1 parent 3520f03 commit af6f467

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎src/providers/grass/qgsgrass.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,6 @@ bool QgsGrass::init( void )
357357
return false;
358358
}
359359

360-
if ( active )
361-
{
362-
QgsGrass::instance()->loadMapsetSearchPath(); // must be after G_no_gisinit()
363-
QgsGrass::instance()->setMapsetSearchPathWatcher();
364-
}
365-
366360
// I think that mask should not be used in QGIS as it can only confuses people,
367361
// anyway, I don't think anybody is using MASK
368362
// TODO7: Rast_suppress_masking (see G_suppress_masking() macro above) needs MAPSET
@@ -474,6 +468,14 @@ bool QgsGrass::init( void )
474468
}
475469

476470
unlock();
471+
472+
// after unlock because it is using setMapset() which calls init()
473+
if ( active )
474+
{
475+
QgsGrass::instance()->loadMapsetSearchPath(); // must be after G_no_gisinit()
476+
QgsGrass::instance()->setMapsetSearchPathWatcher();
477+
}
478+
477479
return true;
478480
}
479481

0 commit comments

Comments
 (0)
Please sign in to comment.