From 3854de73d3c95ae85a22a956fbd595fd26d3bb31 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Sat, 12 Aug 2017 23:11:21 +0200 Subject: [PATCH] Add some bad allocation checks --- src/fmenuitem.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fmenuitem.cpp b/src/fmenuitem.cpp index 0903c1a1..5d1c4c3c 100644 --- a/src/fmenuitem.cpp +++ b/src/fmenuitem.cpp @@ -795,6 +795,7 @@ void FMenuItem::createDialogList (FMenu* winmenu) catch (const std::bad_alloc& ex) { std::cerr << "not enough memory to alloc " << ex.what() << std::endl; + return; } if ( n < 9 )