tablet-shell client:fix one seg-fault error
authorJuan Zhao <juan.j.zhao@linux.intel.com>
Thu, 21 Jun 2012 02:29:27 +0000 (19:29 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 21 Jun 2012 20:11:10 +0000 (16:11 -0400)
commit8634f51b637ca4f8511ce3cba91f36e2927ed614
treef63ec187dc09a46353630ec778f7bce60172b430
parent88fd40815a6cfca0c92c4916be29676fa4512b52
tablet-shell client:fix one seg-fault error

When the icon provided in weston.ini is not available, it will report a segfault error.
Check the icon at first.
backtrace:
*INT_cairo_surface_status (surface=0x0) at cairo-surface.c:259
259     {
(gdb) bt
 #0  *INT_cairo_surface_status (surface=0x0) at cairo-surface.c:259
 #1  0x0804baca in tablet_shell_add_launcher (data=0xbfb800ec)
     at tablet-shell.c:404
 #2  launcher_section_done (data=0xbfb800ec) at tablet-shell.c:434
 #3  0x08051121 in parse_config_file (
     path=0x8b96c10 "/root/.config/weston.ini", sections=0x8053c80,
     num_sections=2, data=0xbfb800ec) at config-parser.c:113
 #4  0x0804c0f9 in main (argc=1, argv=0xbfb801d4) at tablet-shell.c:480

Signed-off-by: Juan Zhao <juan.j.zhao@linux.intel.com>
clients/tablet-shell.c