diff options
Diffstat (limited to 'src/corelib/kernel/qjnihelpers.cpp')
-rw-r--r-- | src/corelib/kernel/qjnihelpers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qjnihelpers.cpp b/src/corelib/kernel/qjnihelpers.cpp index 310d3e24b2..fe204bbee2 100644 --- a/src/corelib/kernel/qjnihelpers.cpp +++ b/src/corelib/kernel/qjnihelpers.cpp @@ -79,8 +79,8 @@ Q_GLOBAL_STATIC(PendingPermissionRequestsHash, g_pendingPermissionRequests); static QBasicMutex g_pendingPermissionRequestsMutex; static int nextRequestCode() { - static QBasicAtomicInt counter; - return counter.fetchAndAddRelaxed(0); + static QBasicAtomicInt counter = Q_BASIC_ATOMIC_INITIALIZER(0); + return counter.fetchAndAddRelaxed(1); } // function called from Java from Android UI thread |