]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkiconcache.c
bin: initialize out variables to zero for get_preferred_ functions.
[~andy/gtk] / gtk / gtkiconcache.c
index 53ceccb47aedafac15385c535ce6f92783e056c4..7d8b3fc7395815f5020726ab1f4a46035f87e535 100644 (file)
@@ -12,9 +12,7 @@
  * Library General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
@@ -448,6 +446,9 @@ _gtk_icon_cache_get_icon (GtkIconCache *cache,
 
   offset = find_image_offset (cache, icon_name, directory_index);
   
+  if (!offset)
+    return NULL;
+
   image_data_offset = GET_UINT32 (cache->buffer, offset + 4);
   
   if (!image_data_offset)