]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
Don't use "Cancel" button in the about dialog of the listctrl sample.
[wxWidgets.git] / src / common / filefn.cpp
index 2e04e80098cb9d0233f83ef37ca598cf4315d576..92ce4c1f64f14aedb710213eef89d31349b1452f 100644 (file)
@@ -1355,9 +1355,7 @@ wxString wxFindNextFile()
     wxCHECK_MSG( gs_dir, "", "You must call wxFindFirstFile before!" );
 
     wxString result;
-    gs_dir->GetNext(&result);
-
-    if ( result.empty() )
+    if ( !gs_dir->GetNext(&result) || result.empty() )
     {
         wxDELETE(gs_dir);
         return result;