libraries/ltkutils/src/proxyallocatorhelper.cpp
changeset 49 b33ec37addee
parent 0 7f656887cf89
--- a/libraries/ltkutils/src/proxyallocatorhelper.cpp	Tue Aug 31 12:11:19 2010 +0100
+++ b/libraries/ltkutils/src/proxyallocatorhelper.cpp	Tue Aug 31 18:33:37 2010 +0100
@@ -31,12 +31,20 @@
 #ifdef FSHELL_MEMORY_ACCESS_SUPPORT
 	TUint8* allocatorAddress;
 	TInt err = iMemoryAccess->GetAllocatorAddress(iThreadId, allocatorAddress);
-	if (!err)
+	if (err == KErrNone)
 		{
-		iAllocatorAddress = (TLinAddr)allocatorAddress;
-		TInt udeb = EuserIsUdeb();
-		if (udeb < 0) return udeb; // error
-		err = IdentifyAllocatorType(udeb);
+		if (allocatorAddress == NULL)
+			{
+			// If the thread has not yet been resumed it's valid for it not to have an allocator yet
+			err = KErrNotReady;
+			}
+		else
+			{
+			iAllocatorAddress = (TLinAddr)allocatorAddress;
+			TInt udeb = EuserIsUdeb();
+			if (udeb < 0) return udeb; // error
+			err = IdentifyAllocatorType(udeb);
+			}
 		}
 	return err;
 #else