summaryrefslogtreecommitdiffstats
path: root/c/src/exec/rtems/src/tasksetpriority.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/rtems/src/tasksetpriority.c')
-rw-r--r--c/src/exec/rtems/src/tasksetpriority.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/exec/rtems/src/tasksetpriority.c b/c/src/exec/rtems/src/tasksetpriority.c
index f79ad581a5..546ea3d537 100644
--- a/c/src/exec/rtems/src/tasksetpriority.c
+++ b/c/src/exec/rtems/src/tasksetpriority.c
@@ -61,6 +61,9 @@ rtems_status_code rtems_task_set_priority(
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
+ if ( !old_priority )
+ return RTEMS_INVALID_ADDRESS;
+
the_thread = _Thread_Get( id, &location );
switch ( location ) {