summaryrefslogtreecommitdiff
path: root/navit/graphics/opengl/graphics_opengl.c
diff options
context:
space:
mode:
Diffstat (limited to 'navit/graphics/opengl/graphics_opengl.c')
-rw-r--r--navit/graphics/opengl/graphics_opengl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/navit/graphics/opengl/graphics_opengl.c b/navit/graphics/opengl/graphics_opengl.c
index b6e0fb41a..c927299dc 100644
--- a/navit/graphics/opengl/graphics_opengl.c
+++ b/navit/graphics/opengl/graphics_opengl.c
@@ -451,7 +451,7 @@ image_new(struct graphics_priv *gr, struct graphics_image_methods *meth,
width = FreeImage_GetWidth(image);
height = FreeImage_GetHeight(image);
- if ((*w != width || *h != height) && 0 < *w && 0 < *h) {
+ if ((*w != width || *h != height) && *w != IMAGE_W_H_UNSET && *h != IMAGE_W_H_UNSET) {
FIBITMAP *image2;
image2 = FreeImage_Rescale(image, *w, *h, FILTER_BOX);
FreeImage_Unload(image);