--- /dev/null
+diff --git a/boost/asio/detail/impl/scheduler.ipp b/boost/asio/detail/impl/scheduler.ipp
+index 4ef5c86688..3955625d15 100644
+--- a/boost/asio/detail/impl/scheduler.ipp
++++ b/boost/asio/detail/impl/scheduler.ipp
+@@ -317,8 +317,10 @@ void scheduler::restart()
+
+ void scheduler::compensating_work_started()
+ {
+- thread_info_base* this_thread = thread_call_stack::contains(this);
+- ++static_cast<thread_info*>(this_thread)->private_outstanding_work;
++ if (thread_info_base* this_thread = thread_call_stack::contains(this))
++ {
++ ++static_cast<thread_info*>(this_thread)->private_outstanding_work;
++ }
+ }
+
+ void scheduler::post_immediate_completion(
Source1001: boost.manifest
Source1002: boost.pc
Source1003: run_test.sh
+Source1004: asio_scheduler.patch
%define _docdir %{_datadir}/doc/packages/boost-%{version}
%setup -q -n %{name}_%{version}
cp %{SOURCE1001} .
cp %{SOURCE1002} .
+%{__patch} -p1 < %{SOURCE1004}
#everything in the tarball has the executable flag set ...
find -type f ! \( -name \*.sh -o -name \*.py -o -name \*.pl \) -exec chmod -x {} +