Check for IO errors when loading binary shader. Fixes #740

This commit is contained in:
Leith Bade
2015-01-12 12:35:09 +11:00
parent f20a17a291
commit 8cca0a27ba
2 changed files with 64 additions and 23 deletions

View File

@@ -250,6 +250,8 @@ void Map::run() {
mode = Mode::None;
fileSource.clearLoop();
}
terminate();
}
void Map::rerender() {
@@ -258,8 +260,9 @@ void Map::rerender() {
} else if (mode == Mode::Continuous) {
// We only send render events if we want to continuously update the map
// (== async rendering).
assert(asyncRender);
asyncRender->send();
if (asyncRender) {
asyncRender->send();
}
}
}
@@ -279,7 +282,9 @@ void Map::swapped() {
void Map::terminate() {
assert(painter);
view.activate();
painter->terminate();
view.deactivate();
}
#pragma mark - Setup