From 238bb1594c6d62cd955320c7d72452cb818489f9 Mon Sep 17 00:00:00 2001 From: "RichardAsh1981@gmail.com" Date: Wed, 18 Sep 2013 19:48:44 +0000 Subject: [PATCH] Patch to avoid dereferences of invalid items by Campbell Barton, tested by Steve the Fiddle --- src/LabelDialog.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/LabelDialog.cpp b/src/LabelDialog.cpp index 2940873ff..f54388253 100644 --- a/src/LabelDialog.cpp +++ b/src/LabelDialog.cpp @@ -644,10 +644,13 @@ void LabelDialog::OnSelectCell(wxGridEvent &event) t = iter.Next(); } - RowData *rd; - rd = mData[event.GetRow()]; - mViewInfo->sel0 = rd->stime; - mViewInfo->sel1 = rd->etime; + if (!mData.empty()) + { + RowData *rd; + rd = mData[event.GetRow()]; + mViewInfo->sel0 = rd->stime; + mViewInfo->sel1 = rd->etime; + } GetActiveProject()->RedrawProject();