Skip to content

Commit

Permalink
Fixup texture cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jun 7, 2017
1 parent ebf6c33 commit fa15244
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/image.cpp
Expand Up @@ -1008,7 +1008,7 @@ surface get_image(const image::locator& i_locator, TYPE type)
i_locator.add_to_cache(*imap, res);

// Add the raw image to the texture cache.
if(type != UNSCALED) {
if(type == UNSCALED && res != nullptr) {
#ifdef _OPENMP
#pragma omp critical(texture_cache)
#endif //_OPENMP
Expand All @@ -1024,6 +1024,10 @@ texture get_texture(const image::locator& i_locator)
// unscaled/unmodified surface has already been loaded from disk.
texture res;

if(i_locator.is_void()) {
return res;
}

bool in_cache;

#ifdef _OPENMP
Expand Down

0 comments on commit fa15244

Please sign in to comment.