]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix segfault
authorMathieu Rene <mrene@avgs.ca>
Thu, 18 Oct 2012 16:48:27 +0000 (12:48 -0400)
committerMathieu Rene <mrene@avgs.ca>
Thu, 18 Oct 2012 16:48:27 +0000 (12:48 -0400)
libs/apr/threadproc/unix/thread.c

index 6c6ff8b8423a6270418baccaf8813974846fc0fd..786f83069e633b07c3de25f28af345e8d53e60fe 100644 (file)
@@ -175,7 +175,7 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
 
     if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {
 #ifndef __APPLE__
-               if (attr->priority) {
+               if (attr && attr->priority) {
                        pthread_t *thread = (*new)->td;
                        pthread_setschedprio(*thread, attr->priority);
                }