diff --git a/src/features/plate.cpp b/src/features/plate.cpp index 10ddc37..a8e6874 100755 --- a/src/features/plate.cpp +++ b/src/features/plate.cpp @@ -75,10 +75,13 @@ bool __cdecl LicensePlate::CCustomCarPlateMgr_Initialise() for (int i = 0; i < ePlateType::TOTAL_SZ; i++) { - strcpy(m_Plates[i]->name, "carpback\0"); - RwTextureSetAddressingU(m_Plates[i], rwFILTERMIPNEAREST); - RwTextureSetAddressingV(m_Plates[i], rwFILTERMIPNEAREST); - RwTextureSetFilterMode(m_Plates[i], rwFILTERLINEAR); + if (m_Plates[i]) + { + RwTextureSetName(m_Plates[i], "carpback"); + RwTextureSetAddressingU(m_Plates[i], rwFILTERMIPNEAREST); + RwTextureSetAddressingV(m_Plates[i], rwFILTERMIPNEAREST); + RwTextureSetFilterMode(m_Plates[i], rwFILTERLINEAR); + } } pCharsetLockedData = RwRasterLock(RwTextureGetRaster(pCharSetTex), 0, rwRASTERLOCKREAD); return pCharsetLockedData != 0;