From 897d250eb520097da7dadb3571af3a9cf922307b Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 9 Feb 2013 21:16:15 -0500 Subject: [PATCH] fix crash if save data can't be loaded --- src/preview/PreviewModel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/preview/PreviewModel.cpp b/src/preview/PreviewModel.cpp index 399fedf68..e1578e116 100644 --- a/src/preview/PreviewModel.cpp +++ b/src/preview/PreviewModel.cpp @@ -56,7 +56,8 @@ void * PreviewModel::updateSaveDataT() int tempDataSize; unsigned char * tempData = Client::Ref().GetSaveData(tSaveID, tSaveDate, tempDataSize); saveDataBuffer.clear(); - saveDataBuffer.insert(saveDataBuffer.begin(), tempData, tempData+tempDataSize); + if (tempData) + saveDataBuffer.insert(saveDataBuffer.begin(), tempData, tempData+tempDataSize); updateSaveDataFinished = true; return NULL; }