summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-12 11:34:01 +0000
committerrubidium <rubidium@openttd.org>2010-12-12 11:34:01 +0000
commit0575c8fec977309b5785ae9d76accf7b5afd6bb8 (patch)
tree4a9a3b492fe0134e900b2ad96af785ca84b59c5d /src
parentd332c59a4cbe8e80ff16b4a8d7e391c277ac936d (diff)
downloadopenttd-0575c8fec977309b5785ae9d76accf7b5afd6bb8.tar.xz
(svn r21475) -Fix: MSVC's code analyser says DeleteObject shouldn't be called with NULL
Diffstat (limited to 'src')
-rw-r--r--src/fontcache.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fontcache.cpp b/src/fontcache.cpp
index d3ba4f0b3..a9dbb2a65 100644
--- a/src/fontcache.cpp
+++ b/src/fontcache.cpp
@@ -281,9 +281,8 @@ err3:
err2:
SelectObject(dc, oldfont);
ReleaseDC(NULL, dc);
-err1:
DeleteObject(font);
-
+err1:
return ret_font_name == NULL ? WIDE_TO_MB((const TCHAR*)logfont->elfFullName) : ret_font_name;
}