From 68a9d536cb01755875ec22b26a7fadbbe57d77a1 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Thu, 19 Feb 2009 23:58:06 +0000 Subject: [PATCH] Return NULL if n < 0 on line 886, for whatever reason on FreeBSD this falls through exception handling and causes and abort(). Originally committed to SVN as r2743. --- aegisub/base_grid.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/aegisub/base_grid.cpp b/aegisub/base_grid.cpp index acd6e1437..933b31715 100644 --- a/aegisub/base_grid.cpp +++ b/aegisub/base_grid.cpp @@ -883,6 +883,7 @@ void BaseGrid::SetColumnWidths() { // Gets dialogue from map AssDialogue *BaseGrid::GetDialogue(int n) { try { + if (n < 0) return NULL; AssEntry *e = *diagMap.at(n); if (e->GetType() != ENTRY_DIALOGUE) return NULL; return AssEntry::GetAsDialogue(e);