From ff7d5c50cf3a1a176d2a47489bf2d7a74e8279e2 Mon Sep 17 00:00:00 2001 From: satbaby Date: Mon, 3 Jan 2011 09:34:54 +0000 Subject: [PATCH] -fix crashes git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@995 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/driver/framebuffer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index d11d2f91c..12fb804a1 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -841,11 +841,15 @@ void CFrameBuffer::setIconBasePath(const std::string & iconPath) void CFrameBuffer::getIconSize(const char * const filename, int* width, int *height) { - std::map::iterator it; - *width = 0; *height = 0; + if(filename == NULL) + return; + + std::map::iterator it; + + /* if code ask for size, lets cache it. assume we have enough ram for cache */ /* FIXME offset seems never used in code, always default = 1 ? */