git.openpandora.org
/
pandora-libraries.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9bcf4a8
)
pndnotifyd: fix some crashes
master
author
Grazvydas Ignotas
<notasas@gmail.com>
Sun, 8 May 2016 20:50:01 +0000
(23:50 +0300)
committer
Grazvydas Ignotas
<notasas@gmail.com>
Sun, 8 May 2016 20:50:01 +0000
(23:50 +0300)
apps/pndnotifyd.c
patch
|
blob
|
history
diff --git
a/apps/pndnotifyd.c
b/apps/pndnotifyd.c
index
5f7f231
..
aa79185
100644
(file)
--- a/
apps/pndnotifyd.c
+++ b/
apps/pndnotifyd.c
@@
-436,8
+436,12
@@
int main ( int argc, char *argv[] ) {
/* shutdown
*/
/* shutdown
*/
- pnd_notify_shutdown ( nh );
- pnd_dbusnotify_shutdown ( dbh );
+ if ( nh ) {
+ pnd_notify_shutdown ( nh );
+ }
+ if ( dbh ) {
+ pnd_dbusnotify_shutdown ( dbh );
+ }
return ( 0 );
}
return ( 0 );
}
@@
-735,10
+739,12
@@
void sigint_handler ( int n ) {
if ( dbh ) {
pnd_dbusnotify_shutdown ( dbh );
if ( dbh ) {
pnd_dbusnotify_shutdown ( dbh );
+ dbh = NULL;
}
if ( nh ) {
pnd_notify_shutdown ( nh );
}
if ( nh ) {
pnd_notify_shutdown ( nh );
+ nh = NULL;
}
return;
}
return;