Changeset 103db908 in mainline
- Timestamp:
- 2018-11-22T10:44:22Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 04c35fca
- Parents:
- dd500c26
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/fontviewer/fontviewer.c
rdd500c26 r103db908 170 170 source_t leading_bg = rgb(170, 238, 255); 171 171 source_t leading_fg = rgb(0, 170, 212); 172 173 font_t *font; 172 font_t *info_font = NULL; 173 font_t *font = NULL; 174 174 175 errno_t rc = create_font(&font, points); 175 176 if (rc != EOK) { 176 177 printf("Failed creating font\n"); 177 return rc; 178 } 179 180 font_t *info_font; 178 goto out_err; 179 } 180 181 181 rc = embedded_font_create(&info_font, 16); 182 182 if (rc != EOK) { 183 183 printf("Failed creating info font\n"); 184 return rc;184 goto out_err; 185 185 } 186 186 … … 188 188 rc = font_get_metrics(font, &font_metrics); 189 189 if (rc != EOK) 190 return rc;190 goto out_err; 191 191 192 192 surface_coord_t top = 50; … … 238 238 } 239 239 240 font_release(font); 241 font_release(info_font); 242 return EOK; 240 out_err: 241 if (font) 242 font_release(font); 243 if (info_font) 244 font_release(info_font); 245 return rc; 243 246 } 244 247
Note:
See TracChangeset
for help on using the changeset viewer.