h3, h5, grGlideInit: return if _GlideRoot.hwConfig.num_sst == 0:

In case of error, _GlideInitEnvironment() calls GrErrorCallback() which is
supposed to be a noreturn function, but it really is not for non-windows..
Eww...
This commit is contained in:
Ozkan Sezer
2021-08-08 23:55:10 +03:00
parent 67ad843c88
commit a6ceeebd00
3 changed files with 21 additions and 0 deletions

View File

@@ -318,6 +318,13 @@ GR_DIENTRY(grGlideInit, void, (void))
gdbg_error_set_callback(_grErrorCallback); gdbg_error_set_callback(_grErrorCallback);
#endif #endif
/* In case of error, _GlideInitEnvironment() calls GrErrorCallback() which is
* supposed to be a noreturn function, but it really is not for non-windows..
* Eww... */
if (!_GlideRoot.hwConfig.num_sst) {
return;
}
#if USE_PACKET_FIFO && (WTF_P_COMDEX || WTF_P_COMDEX_RESET) #if USE_PACKET_FIFO && (WTF_P_COMDEX || WTF_P_COMDEX_RESET)
/* Work around for apps that call some grXXX state call /* Work around for apps that call some grXXX state call
* before calling grSstWinOpen which inits the command fifo. * before calling grSstWinOpen which inits the command fifo.

View File

@@ -351,6 +351,13 @@ GR_DIENTRY(grGlideInit, void, (void))
gdbg_error_set_callback(_grErrorCallback); gdbg_error_set_callback(_grErrorCallback);
#endif #endif
/* In case of error, _GlideInitEnvironment() calls GrErrorCallback() which is
* supposed to be a noreturn function, but it really is not for non-windows..
* Eww... */
if (!_GlideRoot.hwConfig.num_sst) {
return;
}
if (_GlideRoot.initialized) { if (_GlideRoot.initialized) {
initThreadStorage(); initThreadStorage();
initCriticalSection(); initCriticalSection();

View File

@@ -353,6 +353,13 @@ GR_DIENTRY(grGlideInit, void, (void))
GDBG_ERROR_SET_CALLBACK(_grErrorCallback); GDBG_ERROR_SET_CALLBACK(_grErrorCallback);
#endif #endif
/* In case of error, _GlideInitEnvironment() calls GrErrorCallback() which is
* supposed to be a noreturn function, but it really is not for non-windows..
* Eww... */
if (!_GlideRoot.hwConfig.num_sst) {
return;
}
if (_GlideRoot.initialized) { if (_GlideRoot.initialized) {
/* allocate the TLS index */ /* allocate the TLS index */
/* [koolsmoky] According to Microsoft, the TLS index must be allocated /* [koolsmoky] According to Microsoft, the TLS index must be allocated