summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/Src/VertexLoader_Color.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp b/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp
index 12e3ede5d3..41fcb4654a 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp
@@ -22,6 +22,7 @@
#include "VideoCommon.h"
#include "LookUpTables.h"
#include "VertexLoader.h"
+#include "VertexLoaderManager.h"
#include "VertexLoader_Color.h"
#include "NativeVertexWriter.h"
@@ -166,7 +167,12 @@ void LOADERDECL Color_ReadIndex8_24b_6666()
void LOADERDECL Color_ReadIndex8_32b_8888()
{
u8 Index = DataReadU8();
- const u8 *iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]);
+ u8 *iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]);
+ if (!iAddress)
+ {
+ RecomputeCachedArraybases();
+ iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]);
+ }
_SetCol(_Read32(iAddress));
}
//////////////////////////////////////////////////////////////////////////