Ver código fonte

cmLib.c:cmLibInitialize() now checks for empty as well as NULL library path

before scanning for libraries.
master
kevin 11 anos atrás
pai
commit
92c7f0aa9b
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4
    2
      cmLib.c

+ 4
- 2
cmLib.c Ver arquivo

@@ -5,11 +5,13 @@
5 5
 #include "cmCtx.h"
6 6
 #include "cmMem.h"
7 7
 #include "cmMallocDebug.h"
8
+#include "cmLinkedHeap.h"
8 9
 #include "cmFileSys.h"
9 10
 
10 11
 #include "cmLib.h"
12
+#include "cmText.h"
11 13
 
12
-#ifdef OS_LINUX
14
+#ifndef NDEF
13 15
 
14 16
 #include <dlfcn.h>
15 17
 
@@ -119,7 +121,7 @@ cmLibRC_t cmLibInitialize(  cmCtx_t* ctx, cmLibH_t* hp, const cmChar_t* dirStr )
119 121
 
120 122
   hp->h = p;
121 123
 
122
-  if( dirStr != NULL )
124
+  if( cmTextIsNotEmpty(dirStr) )
123 125
     if((rc = cmLibScan(*hp,dirStr)) != kOkLibRC )
124 126
       hp->h = NULL;
125 127
 

Carregando…
Cancelar
Salvar