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.
This commit is contained in:
Amar Takhar 2009-02-19 23:58:06 +00:00
parent c2f3b95fa3
commit 68a9d536cb
1 changed files with 1 additions and 0 deletions

View File

@ -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);