fix LoadProgramNV regression when I had fixed the RefCount bug
diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c
index 0704514..4db78a8 100644
--- a/src/mesa/shader/nvprogram.c
+++ b/src/mesa/shader/nvprogram.c
@@ -160,12 +160,12 @@
       }
 
       prog = (struct program *) _mesa_HashLookup(ctx->Shared->Programs, ids[i]);
-
       if (!prog) {
          _mesa_error(ctx, GL_INVALID_VALUE, "glRequestResidentProgramsNV(id)");
          return;
       }
 
+      /* XXX this is really a hardware thing we should hook out */
       prog->Resident = GL_TRUE;
    }
 }
@@ -529,7 +529,7 @@
         target == GL_VERTEX_STATE_PROGRAM_NV)
        && ctx->Extensions.NV_vertex_program) {
       struct vertex_program *vprog = (struct vertex_program *) prog;
-      if (!vprog) {
+      if (!vprog || prog == &_mesa_DummyProgram) {
          vprog = (struct vertex_program *)
             ctx->Driver.NewProgram(ctx, target, id);
          if (!vprog) {
@@ -543,7 +543,7 @@
    else if (target == GL_FRAGMENT_PROGRAM_NV
             && ctx->Extensions.NV_fragment_program) {
       struct fragment_program *fprog = (struct fragment_program *) prog;
-      if (!fprog) {
+      if (!fprog || prog == &_mesa_DummyProgram) {
          fprog = (struct fragment_program *)
             ctx->Driver.NewProgram(ctx, target, id);
          if (!fprog) {
@@ -776,7 +776,7 @@
    }
 
    if (len <= 0) {
-      _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV");
+      _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV(len)");
       return;
    }
 
@@ -790,7 +790,7 @@
       return;
    }
 
-   _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV");
+   _mesa_error(ctx, GL_INVALID_VALUE, "glProgramNamedParameterNV(name)");
 }