main.c: Fix a crash when clearing a profile
commit09b269e0b7b6e2f197234e64cf6486711d996d03
authorHolger Hans Peter Freyther <zecke@selfish.org>
Mon, 18 Jan 2010 05:28:14 +0000 (18 06:28 +0100)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Mon, 18 Jan 2010 05:28:14 +0000 (18 06:28 +0100)
treec98ef204d0b2c955a9486bfe0c90273cfc1d235b
parent280190e70f4a6d45d26f4efc85c505b8c806d2a4
main.c: Fix a crash when clearing a profile

In the case the user has generated a profile and then
is pressing the swipe button we will crash. This is because
the selection_changed callback will be called and we try
to access the profile and then will crash.

Change the code to check for n_bytes only after we have
checked if there is a selection. This is fixing the crash.
src/main.c