1. shuerhaaken
  2. libtaginfo

Commits

shuerhaaken  committed 5a845d7

null check

  • Participants
  • Parent commits 778440b
  • Branches master

Comments (0)

Files changed (1)

File libtaginfo/info.cc

View file
  • Ignore whitespace
         default :
             break;
     }
-    if(!info || !info->is_valid()) {
+    if(!info ) {
         std::cout << "Could not create from: " << filename << " !" << std::endl;
+        return NULL;
+    }
+    if(!info->is_valid()) {
+        std::cout << "Could not create valid Info from: " << filename << " !" << std::endl;
         if(!info->is_valid()) {
             std::cout << "Info object from " << filename << " is not valid!" << std::endl;
         }