git-svn-id: https://svn.osgeo.org/grass/grass/trunk@37162 15284696-431f-4ddb-bdfa-cd5b030d7da7
@@ -64,6 +64,11 @@ int G_is_initialized(int *p)
#ifdef HAVE_PTHREAD_H
make_mutex();
pthread_mutex_lock(&mutex);
+
+ if (*p) {
+ pthread_mutex_unlock(&mutex);
+ return 1;
+ }
#endif
return 0;
}