--- nono/wx/wxapp.cpp 2026/04/29 17:05:35 1.1.1.17 +++ nono/wx/wxapp.cpp 2026/04/29 17:05:44 1.1.1.19 @@ -100,12 +100,24 @@ WXApp::OnRun() item_fontsize.Err("Must be either 12, 16 or 24"); return EXIT_FAILURE; } - pFontManager.reset(new FontManager()); + try { + pFontManager.reset(new FontManager()); + } catch (...) { } + if ((bool)pFontManager == false) { + warnx("Failed to initialize FontManager"); + return EXIT_FAILURE; + } gFontManager = pFontManager.get(); gFontManager->SetFont(fontid); // ホスト情報用のモニタ (どこでやるのがいいか) - pHostInfo.reset(new HostInfoMonitor()); + try { + pHostInfo.reset(new HostInfoMonitor()); + } catch (...) { } + if ((bool)pHostInfo == false) { + warnx("Failed to initialize HostInfoMonitor"); + return EXIT_FAILURE; + } gHostInfo = pHostInfo.get(); // 手順 6. (vm/device.h) @@ -329,8 +341,13 @@ WXApp::SearchMonitorName(const char *nam for (uint id = ID_MONITOR_START; id <= ID_SUBWIN_END; id++) { if (id < ID_SUBWIN_START) { - // モニターは登録されていなければ除外する - if (gMonitorManager->Find(id) == NULL) { + // モニターは登録されていなければ除外する。 + Monitor *mon = gMonitorManager->Find(id); + if (mon == NULL) { + continue; + } + // SLIRP モニタだけ、登録はされてて obj が NULL という状態がある。 + if (mon->obj == NULL) { continue; } } else {