mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 13:36:24 +02:00
Make sure we never end up with a null vertex decoder.
This commit is contained in:
1 parent
214d1d296a
commit
0e2fb13c61
1 file changed
+2
-1
@@ -66,6 +66,7 @@ VertexDecoder *DrawEngineCommon::GetVertexDecoder(u32 vtype) {
|
||||
if (dec)
|
||||
return dec;
|
||||
dec = new VertexDecoder();
|
||||
_assert_(dec);
|
||||
dec->SetVertexType(vtype, decOptions_, decJitCache_);
|
||||
decoderMap_.Insert(vtype, dec);
|
||||
return dec;
|
||||
@@ -809,7 +810,7 @@ void DrawEngineCommon::SubmitPrim(const void *verts, const void *inds, GEPrimiti
|
||||
}
|
||||
|
||||
// If vtype has changed, setup the vertex decoder.
|
||||
if (vertTypeID != lastVType_) {
|
||||
if (vertTypeID != lastVType_ || !dec_) {
|
||||
dec_ = GetVertexDecoder(vertTypeID);
|
||||
lastVType_ = vertTypeID;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user