From 18fb2620dc5f9c864c18a6a8261c009439afd699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20L=C3=B6fberg?= Date: Mon, 14 Feb 2022 11:35:19 +0100 Subject: [PATCH] Fies #1077 Don't crash on trivially infeasible SOS --- modules/sos/solvesos.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sos/solvesos.m b/modules/sos/solvesos.m index 1631600c..4e432da1 100644 --- a/modules/sos/solvesos.m +++ b/modules/sos/solvesos.m @@ -111,7 +111,7 @@ [F,obj,m,everything,modeltype] = compilesos(F,obj,options,params,candidateMonomials); -if isempty(everything) +if isempty(everything) || ~isfield(everything,'p') % compilesos has detected trivially infeasible sol.yalmipversion = yalmip('version'); sol.matlabversion = version;