Add some paranoid checks hoping to fix crashes reported in Google Play developer console.

This commit is contained in:
Henrik Rydgard committed 2016-04-09 18:27:35 +02:00
1 parent 774539dea8
commit 4197148dc4
8 files changed
+83 -42

No files matched your search

+7 -2
View File
@@ -611,7 +611,9 @@ void NativeShutdownGraphics() {
delete g_gameInfoCache;
g_gameInfoCache = nullptr;
uiTexture->Release();
if (uiTexture->Release()) {
uiTexture = nullptr;
}
delete uiContext;
uiContext = NULL;
@@ -619,7 +621,10 @@ void NativeShutdownGraphics() {
ui_draw2d.Shutdown();
ui_draw2d_front.Shutdown();
thin3d->Release();
// TODO: Reconsider this annoying ref counting stuff.
if (thin3d->Release()) {
thin3d = nullptr;
}
}
void TakeScreenshot() {