From b2e4d58259d8e4ca744d40ad53bb3ca5e3d0ed3d Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 12 Jun 2017 21:33:35 +0100 Subject: avoid crash with too few items --- menuApp/src/ofApp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'menuApp/src/ofApp.cpp') diff --git a/menuApp/src/ofApp.cpp b/menuApp/src/ofApp.cpp index 8dbf41b..ce141de 100644 --- a/menuApp/src/ofApp.cpp +++ b/menuApp/src/ofApp.cpp @@ -29,7 +29,7 @@ bool ofApp::loadInstagramFeed(){ } */ items.clear(); - items.resize(IMAGE_SLOTS); + //items.resize(IMAGE_SLOTS); instagram.getUserRecentMedia("self"); //instagram.getUserLikedMedia(12); @@ -87,7 +87,7 @@ bool ofApp::loadInstagramFeed(){ if (interesting){ - items[slot]=menuItem(caption,price); + items.push_back(menuItem(caption,price)); //items[slot]=menuItem(test[i],price); std::string id=instagram.getImageID()[i]; @@ -137,7 +137,7 @@ void ofApp::setup(){ ofLog(OF_LOG_NOTICE) << "code for € is " << ((int)str.at(0)) << " not " << 0xA4; ofLog(OF_LOG_NOTICE) << "-30 as uint8_t is " << ((int)((uint8_t)-30)); */ - items.resize(IMAGE_SLOTS); + //items.resize(IMAGE_SLOTS); ofTrueTypeFont::setGlobalDpi(150); -- cgit v1.2.3