diff --git a/retroshare-gui/src/gui/common/PictureFlow.cpp b/retroshare-gui/src/gui/common/PictureFlow.cpp index ad10fb2e8..9087ad3a5 100644 --- a/retroshare-gui/src/gui/common/PictureFlow.cpp +++ b/retroshare-gui/src/gui/common/PictureFlow.cpp @@ -293,9 +293,9 @@ PictureFlowState::PictureFlowState(): PictureFlowState::~PictureFlowState() { - while (! slideImages.isEmpty()) { - delete slideImages.takeFirst(); - } + for(uint i=0;istate->slideImages.isEmpty()) { - delete d->state->slideImages.takeFirst(); - } - + for(uint i=0;istate->slideImages.size();++i) + delete d->state->slideImages[i] ; + d->state->slideImages.clear() ; + d->state->reset(); triggerRender(); }