diff options
Diffstat (limited to 'backends/PalmOS/Src/init_arm.cpp')
-rw-r--r-- | backends/PalmOS/Src/init_arm.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/backends/PalmOS/Src/init_arm.cpp b/backends/PalmOS/Src/init_arm.cpp index 77aea25cee..1770a489da 100644 --- a/backends/PalmOS/Src/init_arm.cpp +++ b/backends/PalmOS/Src/init_arm.cpp @@ -5,17 +5,20 @@ static void PnoInit(DmResID resID,PNOInitType *pnoP) { // Load and allocate PNO MemHandle armH = DmGetResource('ARMC', resID); - MemPtr armP = MemHandleLock(armH); - PnoLoad(&pnoP->pnoDesc, armP); - MemPtrUnlock(armP); - DmReleaseResource(armH); - // Init PNO - PnoEntryHeader *header = (PnoEntryHeader *)ALIGN_4BYTE(pnoP->headerBuffer); - pnoP->alignedHeader = header; + if (armH) { + MemPtr armP = MemHandleLock(armH); + PnoLoad(&pnoP->pnoDesc, armP); + MemPtrUnlock(armP); + DmReleaseResource(armH); + + // Init PNO + PnoEntryHeader *header = (PnoEntryHeader *)ALIGN_4BYTE(pnoP->headerBuffer); + pnoP->alignedHeader = header; - header->r10Value = pnoP->pnoDesc.r10Value; - header->pnoMainAddress = pnoP->pnoDesc.pnoMainAddress; + header->r10Value = pnoP->pnoDesc.r10Value; + header->pnoMainAddress = pnoP->pnoDesc.pnoMainAddress; + } } void ARMInit() { |