mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Make sure we never end up with a null vertex decoder.
This commit is contained in:
parent
214d1d296a
commit
0e2fb13c61
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue