From 4f36bf1cad5340eb9d0b619d1ab1f74622c6ef12 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Sat, 6 Dec 2014 22:11:27 +0100
Subject: [PATCH] Fixed bug in pop method.

Avoid crash if o is empty.
---
 src/@dates/pop.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/@dates/pop.m b/src/@dates/pop.m
index b7d0c85..48f0036 100644
--- a/src/@dates/pop.m
+++ b/src/@dates/pop.m
@@ -28,6 +28,10 @@ function o = pop(o, p) % --*-- Unitary tests --*--
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+if o.isempty()
+    return
+end
+    
 if nargin<2
     % Remove last date
     o.ndat = o.ndat-1;
-- 
GitLab