--- nono/vm/lunafb.cpp 2026/04/29 17:05:33 1.1.1.7 +++ nono/vm/lunafb.cpp 2026/04/29 17:05:42 1.1.1.9 @@ -77,7 +77,12 @@ LunafbDevice::Init() fcset_end = fcset0base + 0x40000 * nplane; // プレーン数によってメモリを確保 - mem.reset(new uint8 [0x40000 * nplane]); + size_t memsize = 0x40000 * nplane; + mem.reset(new(std::nothrow) uint8 [memsize]); + if ((bool)mem == false) { + warnx("Cannot allocate %zu bytes at %s", memsize, __method__); + return false; + } // ホストパレットを取得。 palette = &(bt45x->GetHostPalette())[0];